Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Slash2004
Starting Member
2 Posts |
Posted - 2004-09-07 : 23:07:48
|
| I 'm trying to create DTS loader from SQL Server to VB by using VB6. I have aproblem that first time we createDTS, it must supply the excel filename, but I want it to dynamic and not fixed!how can I achieve that?I use this code to load dts to excel:Private Sub cmddts_click()Dim dtsp As New DTS.Package dtsp.LoadFromSQLServer _ ServerName:="iapsvrtgr", _ ServerUserName:="sa", _ ServerPassword:="rrr", _ PackageName:="DTStest" dtsp.Execute MsgBox "ll"End Subthank you |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-09-08 : 00:08:04
|
| How about including an activex task inside your dtspackage - you can use vbscript in the activex task and that way dynamically open the excel file.Duane. |
 |
|
|
Slash2004
Starting Member
2 Posts |
Posted - 2004-09-08 : 00:23:52
|
| I mean how to set up the activex dynamiclybecuase we have to set the filename for the excel, how to make the excel file dynamic.connection from SQL to Excel using VB6 |
 |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-09-08 : 00:38:53
|
| Maybe you can do it without DTS.Have you tried looking at OPENDATASOURCE.eg: SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=c:\temp\book1;Extended Properties=Excel 8.0')Duane. |
 |
|
|
|
|
|