views:

685

answers:

1

Hello, 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? Thanks!

A: 

DBISAM error messages Check the field name.

Tester101