简体   繁体   中英

Update function on a RecordSet object in VBscript causing DBISAM parse error

I'm having difficulty using the Update function on a RecordSet object while using the DBISAM 4 ODBC driver. Here is what my code looks like.

dtmNewDate = DateSerial(1997, 2, 3)
 MsgBox(dtmNewDate)

'Create connection object & connection string

Set AConnection = CreateObject("ADODB.Connection")

strConnection = "Driver={DBISAM 4 ODBC Driver}; CatalogName=S:\RAPID\Z998\2008; ReadOnly=False"
Aconnection.Mode = adModeReadWrite

AConnection.Open strConnection



'create SQL statement to be run in order to populate the recordset

strSQLEmployeeBDate = "SELECT * FROM Z998EMPL WHERE state = 'NY'"

'Create Recordset object

Set rsRecSet = CreateObject("ADODB.Recordset")

rsRecSet.LockType = 2

rsRecSet.Open strSQLEmployeeBDate, AConnection


While Not rsRecSet.EOF 

  rsRecSet.Fields("BIRTHDATE").value = dtmNewDate


  rsRecSet.Update

  rsRecSet.MoveNext

Wend 

When I try to execute this code I receive the following error:

"DBISAM Engine Error #11949 SQL Parsing error- Expected ( but instead found = in UPDATE SQL statement at line 1, column 336"

I can't figure out what is causing this error. Does anyone have any ideas as to what is causing it?

DBISAM错误消息检查字段名称。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM