Har kört package and deployment wizard och skapat ett setuppaket. Efter installation på anna dator får jag fel "Runtime error 429 ActiveXcomponent cant create object"Runtime error 429 ActiveXcomponent cant create object
Tacksam för hjälp!
Koden ser ut så här:
Dim WithEvents cnTest As ADODB.Connection
Dim strfran As String
Dim strtill As String
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Set cnTest = New ADODB.Connection
cnTest.CommandTimeout = 580
cnTest.ConnectionTimeout = 580
strfran = txtfran.Text
strtill = txttill.Text
cnTest.Open "Provider=SQLOLEDB.1; Persist Security Info=False; User ID=anna; Password=anna; Initial Catalog=update; Data Source=sto01"
cnTest.Execute "Truncate table Dagens"
cnTest.Execute "Insert into Dagens SELECT * From ep1_1 WHERE id_502 between '" & strfran & "' And '" & strtill & "'"
Set dtsPackage = New DTS.Package
dtsPackage.LoadFromSQLServer ServerName:="STO01", _
ServerUserName:="anna", _
ServerPassword:="anna", _
PackageName:="VBUppdatering"
dtsPackage.Execute
MsgBox ("Uppdateringen är klar")
End Sub