General information
Title:
Problem in using C# with VFP Data
Hello all,
I have a problem updating a VFP table from C# code, whenever i try to pass text from a multiline textbox to a VFP memo field.
When i execute the following code:
_comando.CommandType = CommandType.Text;
_comando.Connection = _connection;
_comando.CommandText = _text;
_comando.ExecuteNonQuery();
where _text = "update _table set datamov = {^2007/05/12}, horai = '08:00' nao_conf = 'line1 line2', normas = 'line 1' where numero = 125 and nitem = 1"
At _comando.ExecuteNonQuery() i got this error: "Command contains unrecognized phrase/keyword."
The problem is in the sentence "nao_conf = 'line1 line2'", if i go back to the multiline textbox and delete de 2nd line the error does not happens.
The VFP table field 'normas' is also a memo field, filled with data from a multiline textbox, but as i put only a line of text, i got no error. If i put 2 or more lines i would get the same error.
If i go to a VFP command line and execute this code i get no error, is obvious. The problem is at the way C# builds the string or in the VfpOleDb.
Does anybody knows why? And how to solve this?
TIA,
Joaquim
Joaquim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only