From: Bryce-DFW on
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
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
Text - 255 Characters
From: Dave C on
try it like this

UPDATE table_name
SET column_name = new_value
WHERE column_name = some_value
From: Dave C on
Text values need to be in single quotes. Integers do not.