dsa1971


Using ado.net with the foxpro ole db provider I am trying to insert a record in the database that has a memo field. In the memo field I am trying to add some data seperated by a carriage return and line feed. Unfortunately, when I run it I keep getting a "Command contains unrecognized phrase/keyword" oledb exception. I have tried using string concatenation to add my parameter values to my query string and added in parameters using the " " but I keep getting the error. Any ideas on how to get this to work This is really frustrating.



Re: adding carriage return and line feed through foxpro oledb provider

dni


You may tray to add CHR(13) before CR:

string1+CHR(13)+string2...







Re: adding carriage return and line feed through foxpro oledb provider

CetinBasoz

http://www.universalthread.com/wconnect/wc.dll 2,15,1212087

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=634904&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=751302&SiteID=1






Re: adding carriage return and line feed through foxpro oledb provider

dsa1971

The only way I could get it to work was to do an insert with the literals chr(10) and chr(13) in the memo field as placeholders then do an update like the following:

Code Snippet

sqlstring = "update mytable set info = strtran(strtran(info,'chr(10)',chr(10)),'chr(13)',chr(13)) where id = '" & id & "'"





Re: adding carriage return and line feed through foxpro oledb provider

CetinBasoz

No you don't have to do such thing. Check codes provided in links.