![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an asp page that enables users to write and run queries without knowing SQL. After running, the users often want to download the results to MS Excel. I have written VB code to create a DTS package. The package has a connection to my SQL database and an excel file. For now (test) I have hardcoded the Excel Filename/path. The package contains a DataPumpTask and a step. I can run the code on my server that executes the package and all seems correct, except that no file is generated. Does anyone have any Idea why? Separately, I saved the DTS package to the SQL Server. When I try to run it, I receive an error stating that the package cannot find the destination table (excel file). Since the content of the file is not know until runtime, how can I cause the package to create and populate the file? Any help appreciated. |
#3
| |||
| |||
|
|
I have an asp page that enables users to write and run queries without knowing SQL. After running, the users often want to download the results to MS Excel. I have written VB code to create a DTS package. The package has a connection to my SQL database and an excel file. For now (test) I have hardcoded the Excel Filename/path. The package contains a DataPumpTask and a step. I can run the code on my server that executes the package and all seems correct, except that no file is generated. Does anyone have any Idea why? Separately, I saved the DTS package to the SQL Server. When I try to run it, I receive an error stating that the package cannot find the destination table (excel file). Since the content of the file is not know until runtime, how can I cause the package to create and populate the file? Any help appreciated. |
#4
| |||
| |||
|
|
How can I retrieve a list of columns/column definitions that I can use in the create table statement? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:O3A7x4abEHA.808 (AT) tk2msftngp13 (DOT) phx.gbl... You can use CREATE TABLE in an ExecuteSQL task to create a Table/Named Range in XL. If no Excel File exists DTS will not automagically create one ala csv files. -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Kerry Carroll" <carrolky (AT) fuse (DOT) net> wrote in message news:%23oEgG0abEHA.2944 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I have an asp page that enables users to write and run queries without knowing SQL. After running, the users often want to download the results to MS Excel. I have written VB code to create a DTS package. The package has a connection to my SQL database and an excel file. For now (test) I have hardcoded the Excel Filename/path. The package contains a DataPumpTask and a step. I can run the code on my server that executes the package and all seems correct, except that no file is generated. Does anyone have any Idea why? Separately, I saved the DTS package to the SQL Server. When I try to run it, I receive an error stating that the package cannot find the destination table (excel file). Since the content of the file is not know until runtime, how can I cause the package to create and populate the file? Any help appreciated. |
#5
| |||
| |||
|
|
How can I retrieve a list of columns/column definitions that I can use in the create table statement? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:O3A7x4abEHA.808 (AT) tk2msftngp13 (DOT) phx.gbl... You can use CREATE TABLE in an ExecuteSQL task to create a Table/Named Range in XL. If no Excel File exists DTS will not automagically create one ala csv files. -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Kerry Carroll" <carrolky (AT) fuse (DOT) net> wrote in message news:%23oEgG0abEHA.2944 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I have an asp page that enables users to write and run queries without knowing SQL. After running, the users often want to download the results to MS Excel. I have written VB code to create a DTS package. The package has a connection to my SQL database and an excel file. For now (test) I have hardcoded the Excel Filename/path. The package contains a DataPumpTask and a step. I can run the code on my server that executes the package and all seems correct, except that no file is generated. Does anyone have any Idea why? Separately, I saved the DTS package to the SQL Server. When I try to run it, I receive an error stating that the package cannot find the destination table (excel file). Since the content of the file is not know until runtime, how can I cause the package to create and populate the file? Any help appreciated. |
#6
| |||
| |||
|
|
I can parse the list of field names from the Select clause (if that's the only way), but don't I need the field definitions to include in the Create Table statement? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eUUjEMbbEHA.3476 (AT) tk2msftngp13 (DOT) phx.gbl... I thought you said you were building the statement in an ASP app so can you not grab it from there. -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Kerry Carroll" <carrolky (AT) fuse (DOT) net> wrote in message news:uPcID9abEHA.1248 (AT) TK2MSFTNGP11 (DOT) phx.gbl... How can I retrieve a list of columns/column definitions that I can use in the create table statement? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:O3A7x4abEHA.808 (AT) tk2msftngp13 (DOT) phx.gbl... You can use CREATE TABLE in an ExecuteSQL task to create a Table/Named Range in XL. If no Excel File exists DTS will not automagically create one ala csv files. -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Kerry Carroll" <carrolky (AT) fuse (DOT) net> wrote in message news:%23oEgG0abEHA.2944 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I have an asp page that enables users to write and run queries without knowing SQL. After running, the users often want to download the results to MS Excel. I have written VB code to create a DTS package. The package has a connection to my SQL database and an excel file. For now (test) I have hardcoded the Excel Filename/path. The package contains a DataPumpTask and a step. I can run the code on my server that executes the package and all seems correct, except that no file is generated. Does anyone have any Idea why? Separately, I saved the DTS package to the SQL Server. When I try to run it, I receive an error stating that the package cannot find the destination table (excel file). Since the content of the file is not know until runtime, how can I cause the package to create and populate the file? Any help appreciated. |
#7
| |||
| |||
|
|
I have an asp page that enables users to write and run queries without knowing SQL. After running, the users often want to download the results to MS Excel. I have written VB code to create a DTS package. The package has a connection to my SQL database and an excel file. For now (test) I have hardcoded the Excel Filename/path. The package contains a DataPumpTask and a step. I can run the code on my server that executes the package and all seems correct, except that no file is generated. Does anyone have any Idea why? Separately, I saved the DTS package to the SQL Server. When I try to run it, I receive an error stating that the package cannot find the destination table (excel file). Since the content of the file is not know until runtime, how can I cause the package to create and populate the file? Any help appreciated. |
![]() |
| Thread Tools | |
| Display Modes | |
| |