29/03/2007, 09:02
|
| | Fecha de Ingreso: junio-2006
Mensajes: 109
Antigüedad: 18 años, 7 meses Puntos: 2 | |
Re: ejecutar paquete DTS en pc sin sql server
Código:
Private Sub Command1_Click()
Dim oPackage As New DTS.Package
On Error GoTo eh
'Load the package that we created previously
' ("Customer_List").
'Use the global variables for SQL Server name, UserID,
'and Password.
oPackage.LoadFromSQLServer "adp37", "sa", "admin", _
DTSSQLStgFlag_Default, _
"", "", "", "ODSFileReciving", 0
'Execute the Package
oPackage.Execute
MsgBox oPackage.Description, vbInformation, _
"Re-import Excel sheet."
'Clean up.
Set oPackage = Nothing
Exit Sub
eh:
MsgBox Err.Description, vbCritical, _
"Error refreshing Customer List"
'For more sophisticated sample VB code with DTS, go
'to the SQL Server 7 CD and browse these folders:
'devtools\samples\dts\dtsempl1 or 2 or 3.
End Sub
Suerte |