|
From: Bryce-DFW on 19 Dec 2007 17:46 I need help! I am trying to figure out how to send text variables back to an MS Access Database. I have been able to successfully read the field in the data base and set the variable. When the learner completed the information, I would like to send back to the database the fact that the section is complete. I have been able to send back numerical values, but not text. Here is the error from the trace: -- UPDATE [Student_Data] set [DocReq] = Started WHERE logonID = 'logonUserID' -- [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. Here is the code that I am currently using: odbcStatement := "UPDATE [Student_Data] set [DocReq] = "^DocRequirement^" WHERE logonID = 'logonUserID'" Like I said, the code works when I change [b]started[/b] to a numerical value. Any help is greatly appreciated...
From: Dave C on 19 Dec 2007 17:54 Shouldn't Started be enclosed in single quotes? What type of data is the DocReq column set up to hold? UPDATE [Student_Data] set [DocReq] = 'Started' WHERE logonID = logonUserID' Bryce-DFW wrote: > I need help! I am trying to figure out how to send text variables back to an > MS Access Database. I have been able to successfully read the field in the > data base and set the variable. When the learner completed the information, I > would like to send back to the database the fact that the section is complete. > > I have been able to send back numerical values, but not text. > > Here is the error from the trace: > > -- UPDATE [Student_Data] set [DocReq] = Started WHERE logonID = 'logonUserID' > -- [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. > > Here is the code that I am currently using: > odbcStatement := "UPDATE [Student_Data] set [DocReq] = "^DocRequirement^" > WHERE logonID = 'logonUserID'" > > Like I said, the code works when I change [b]started[/b] to a numerical value. > > Any help is greatly appreciated... >
From: Bryce-DFW on 19 Dec 2007 19:01 Text - 255 Characters
From: Dave C on 19 Dec 2007 20:39 try it like this UPDATE table_name SET column_name = new_value WHERE column_name = some_value
From: Dave C on 19 Dec 2007 20:41
Text values need to be in single quotes. Integers do not. |