![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I tried to export data from SQL Server to a Excel file within ASP. I use DTSPackage object library V2.0. I know that it can connection to a Excel file using the following code in VB. But I got problem within ASP. The error shows up while my ASP running: "Microsoft VBScript rnntiom error: Object doesn't support this property or method: 'ConnectionProperties' ", which means, I think, that VBScript does NOT support "ConnectionProperties". How can I specify my data type to Excel file using VBScript within ASP? Set oConnection = goPackage.Connections.New("Microsoft.Jet.OLEDB.4.0 ") oConnection.ConnectionProperties("Data Source") = "C:\My Documents\tblReportType1.xls" oConnection.ConnectionProperties("Extended Properties") = "Excel 8.0;HDR=YES;" oConnection.Name = "Connection 2" oConnection.ID = 2 oConnection.Reusable = True oConnection.ConnectImmediate = False oConnection.DataSource = "C:\My Documents\tblReportType1.xls" oConnection.UserID = "Admin" oConnection.ConnectionTimeout = 60 oConnection.UseTrustedConnection = False oConnection.UseDSL = False 'If you have a password for this connection, please uncomment and add your password below. 'oConnection.Password = "<put the password here>" goPackage.Connections.Add oConnection Set oConnection = Nothing |
#3
| |||
| |||
|
|
I tried to export data from SQL Server to a Excel file within ASP. I use DTSPackage object library V2.0. I know that it can connection to a Excel file using the following code in VB. But I got problem within ASP. The error shows up while my ASP running: "Microsoft VBScript rnntiom error: Object doesn't support this property or method: 'ConnectionProperties' ", which means, I think, that VBScript does NOT support "ConnectionProperties". How can I specify my data type to Excel file using VBScript within ASP? Set oConnection = goPackage.Connections.New("Microsoft.Jet.OLEDB.4.0 ") oConnection.ConnectionProperties("Data Source") = "C:\My Documents\tblReportType1.xls" oConnection.ConnectionProperties("Extended Properties") = "Excel 8.0;HDR=YES;" oConnection.Name = "Connection 2" oConnection.ID = 2 oConnection.Reusable = True oConnection.ConnectImmediate = False oConnection.DataSource = "C:\My Documents\tblReportType1.xls" oConnection.UserID = "Admin" oConnection.ConnectionTimeout = 60 oConnection.UseTrustedConnection = False oConnection.UseDSL = False 'If you have a password for this connection, please uncomment and add your password below. 'oConnection.Password = "<put the password here>" goPackage.Connections.Add oConnection Set oConnection = Nothing |
![]() |
| Thread Tools | |
| Display Modes | |
| |