Home All Groups Group Topic Archive Search About

Access database Memo data types

Author
3 Nov 2005 2:37 PM
Sanjib Biswas
Hi,

    I am trying to add record (INSERT INTO...) into a Memo field in the
access database. But the ExecuteNonQuery() throws an exception. "Syntax
error (missing operator) in query expression "<field value>"". Also note
that <field value> is a string and has apostrophes in two places. For text
field I am sending with apostrophes around the field value and it works.

Does any one know, what I am missing here?

Regards
Sanjib

Author
3 Nov 2005 3:05 PM
Sanjib Biswas
I got the answer Chr(34) + <field value> + Chr(34)

Show quote
"Sanjib Biswas" <sanjib.bis***@ieee.org> wrote in message
news:ubpjZQI4FHA.696@TK2MSFTNGP09.phx.gbl...
> Hi,
>
>    I am trying to add record (INSERT INTO...) into a Memo field in the
> access database. But the ExecuteNonQuery() throws an exception. "Syntax
> error (missing operator) in query expression "<field value>"". Also note
> that <field value> is a string and has apostrophes in two places. For text
> field I am sending with apostrophes around the field value and it works.
>
> Does any one know, what I am missing here?
>
> Regards
> Sanjib
>
Author
5 Nov 2005 1:49 PM
Sanjib Biswas
By the does any know, the correct way to insert a Memo record into Access
database? Because even after adding quote before and after the field value
does not work all the times. Sometime, I had to pass double quote 'Chr(39)'
to get it working.

Regards
Sanjib

Show quote
"Sanjib Biswas" <sanjib.bis***@ieee.org> wrote in message
news:ebAPcgI4FHA.700@TK2MSFTNGP15.phx.gbl...
>I got the answer Chr(34) + <field value> + Chr(34)
>
> "Sanjib Biswas" <sanjib.bis***@ieee.org> wrote in message
> news:ubpjZQI4FHA.696@TK2MSFTNGP09.phx.gbl...
>> Hi,
>>
>>    I am trying to add record (INSERT INTO...) into a Memo field in the
>> access database. But the ExecuteNonQuery() throws an exception. "Syntax
>> error (missing operator) in query expression "<field value>"". Also note
>> that <field value> is a string and has apostrophes in two places. For
>> text field I am sending with apostrophes around the field value and it
>> works.
>>
>> Does any one know, what I am missing here?
>>
>> Regards
>> Sanjib
>>
>
>

AddThis Social Bookmark Button