I am in the process of building a small appliaction that will interact with a Micrsoft Access Database.
I have successfully connected through ODBC and can fetch data fine but now am at the stage of wanting to update some records.
Please note: this is my first attempt at using any sort of database

I have constructed the below code to update some records but I keep getting an error when I execute the code
"[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'VIMSTime=2013-04-07 13:25:47' "
This is what one the completed query's looks like
Code: Select all
UPDATE EventDetail SET GPS_Lat_Coordinate=228023.42, GPS_Long_Coordinate=6609576.50, GPS_Alt_Coordinate=401.12 WHERE VIMSTime=2013-04-09 15:03:06
Note: I have tried chnaging the below code to add single quotes around the VIMSTime value but get the following error:
"[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1."
Code: Select all
on compareAndMerge
-- Compare and where boolean = true update the VIMS Database accordingly
repeat with x = 1 to the number of lines in lConvertedFileContents
## Placing all the GPS data into Variables
put item 3 of line x of lConvertedFileContents into tTimeStamp
put item 5 of line x of lConvertedFileContents into tLat
put item 6 of line x of lConvertedFileContents into tLong
put item 7 of line x of lConvertedFileContents into tAlt
## Run the query and place the results into a Gloabl variable
put "UPDATE EventDetail SET GPS_Lat_Coordinate="&tLat&comma&space& \
"GPS_Long_Coordinate="&tLong&comma&space& \
"GPS_Alt_Coordinate="&tAlt&space&"WHERE VIMSTime="&tTimeStamp into tQuery
put revdb_execute(gDataSourceConnectID,tQuery) into tResult
put tResult
end repeat