Ghost21 Posted September 3, 2010 Posted September 3, 2010 Local $oRS Local $oConn $col = "HDSize" $rowind = "computername" $oConn = ObjCreate("ADODB.Connection") $oRS = ObjCreate("ADODB.Recordset") $user = "test" $NUMBER ="test2" $email = "test3" ;Create error handler $oError = ObjCreate("ADODB.Error") $oConn.Open ("Driver={Microsoft Access Driver (*.mdb)};Dbq=Y:\dbs\sw.mdb") $oRS.Open ("Select * FROM USERNUMBEREMAIL", $oConn, 1, 3) $oRS.RecordCount $oRS.MoveFirst For $iIndex = 1 To $oRS.RecordCount $oConn.Execute("INSERT INTO UserNumberEmail (USER,NUMBER,EMAIL) VALUES ('" & $User & "','" & $NUMBER & "','" & $EMAIL & "');") ;Display any errors For $ErrorObj In $oError MsgBox(0,"",$ErrorObj.Description) Next $oRS.MoveNext Next $oConn.Close $oConn = 0 I get this as an error: ??? (19) : ==> The requested action with this object has failed.: $oConn.Execute("INSERT INTO UserNumberEmail (USER,NUMBER,EMAIL) VALUES ('" & $User & "','" & $NUMBER & "','" & $EMAIL & "');") $oConn.Execute("INSERT INTO UserNumberEmail (USER,NUMBER,EMAIL) VALUES ('" & $User & "','" & $NUMBER & "','" & $EMAIL & "');")^ ERROR ->22:23:02 AutoIT3.exe ended.rc:1 What on earth am I doing wrong ???
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now