-1

I create a string variable for an Update SQL command in order to execute this command to a dbf file ( with OleDb).

When my SQL Command contain in a string \r\n the SqlCommand is not accepted :(

Here is an example of my SQL Command :

update ZZAg7eve set evenotes = 'line1\r\nline2' where eveNum = '00000003'

I know that the problem is \r\n. I tried to use a verbatim, but there is always the same error : "Command contains unreconized phrase/keywords".

Jason Watkins
  • 3,658
  • 1
  • 21
  • 39
Walter Fabio Simoni
  • 5,331
  • 11
  • 43
  • 73

1 Answers1

1

In VFP, you use CHR(13) + CHR(10) to indicate CRLF. So try:

update ZZAg7eve set evenotes = 'line1' + chr(13) + chr(10) + 'line2' where eveNum = '00000003'
Tamar E. Granor
  • 3,532
  • 1
  • 18
  • 26