Folks,
I am using ADP (2K) from end, SQL back end.
I am having a weird problem. I have a DTS Package that imports EXCEL data from Local Drive to a SQL Temporary File.
1) When I Execute the Package from the EnterPrise Manager, it always Works.
2) But when I start my ADP program (Below is the code), and Execute that DTS package from VBA, It never works (import Excel Data) 1st time, but if I re-run the same code again and again it works fine all the time. I am pulling my hair to find what is wrong... Any help will be appreciated.. (Below is my VBA Code)..
_______________________
Private Sub SimpleExecutePackage()
Dim oPKG As New DTS.Package
oPKG.LoadFromSQLServer "ImportData", , , _
DTSSQLStgFlag_UseTrustedConnection, , , , "ImportAttendance"
oPKG.Execute
oPKG.UnInitialize
Set oPKG = Nothing
End Sub
I am using ADP (2K) from end, SQL back end.
I am having a weird problem. I have a DTS Package that imports EXCEL data from Local Drive to a SQL Temporary File.
1) When I Execute the Package from the EnterPrise Manager, it always Works.
2) But when I start my ADP program (Below is the code), and Execute that DTS package from VBA, It never works (import Excel Data) 1st time, but if I re-run the same code again and again it works fine all the time. I am pulling my hair to find what is wrong... Any help will be appreciated.. (Below is my VBA Code)..
_______________________
Private Sub SimpleExecutePackage()
Dim oPKG As New DTS.Package
oPKG.LoadFromSQLServer "ImportData", , , _
DTSSQLStgFlag_UseTrustedConnection, , , , "ImportAttendance"
oPKG.Execute
oPKG.UnInitialize
Set oPKG = Nothing
End Sub