I am soon going to be working with SQL Server, and not Access. Currently I do not have away to try this. So I was woundering if anyone knows if this can be done with SQL Server.
Currently I use something like this to import an Excel sheet to an Access Database table:
StrSQL = "SELECT [Summary$].* INTO [Escrow_Avdvance_rtp1] FROM [Summary$] IN '" & FileName2 & "' [Excel 8.0; HDR = YES;];"
Cn.Execute StrSQL
Or something like this to get data from an Access data base to an Excel sheet .
SQLStr = ("SELECT * INTO [Excel 8.0;" & "Database=G:\APPO\MerlsS2.XLS].[Sheet1]" FROM tblFinalOut")
CN.Execute SQLStr
I was wondering if this would work if I was using a SQL Server database instead of an Access Database. If not what could I use? I know that I can use DTS but I Want to run it from the vb Program and I do not know how to run a DTS from a VB Program.
Thank you
ITM
Currently I use something like this to import an Excel sheet to an Access Database table:
StrSQL = "SELECT [Summary$].* INTO [Escrow_Avdvance_rtp1] FROM [Summary$] IN '" & FileName2 & "' [Excel 8.0; HDR = YES;];"
Cn.Execute StrSQL
Or something like this to get data from an Access data base to an Excel sheet .
SQLStr = ("SELECT * INTO [Excel 8.0;" & "Database=G:\APPO\MerlsS2.XLS].[Sheet1]" FROM tblFinalOut")
CN.Execute SQLStr
I was wondering if this would work if I was using a SQL Server database instead of an Access Database. If not what could I use? I know that I can use DTS but I Want to run it from the vb Program and I do not know how to run a DTS from a VB Program.
Thank you
ITM