![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When I try to run the below simple script to add a record to an Access table, I get an Jet db Engine error on the rst.Open line stating that it is an invalide SQL Statment; Expected Delete, Insert, Procedure, Select or Update. Sigh, I don't want to use an SQL statement. Can anyone please tell me what is wrong with the below and how to fix it? ********* job script language="VBScript" Const adOpenKeyset = 1 Const adLockOptimistic = 3 Const adCmdTable = 1 Dim objConn, objRst Set objConn = CreateObject("ADODB.Connection") objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=F:\My Documents\Programming\WSF Files\SysInfo.mdb" Set objRst = CreateObject("ADODB.Recordset") objRst.Open "tblSysInfo", objConn, _ adOpenKeyset, adLockOptimistic, adCmdTable objRst.AddNew objRst("IPAddr") = "172.20.35.100" objRst("PCName") = "MyComputer" objRst.Update objRst.Close /script /job |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |