Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in using C# with VFP Data
Message
De
12/05/2007 04:30:38
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Problem in using C# with VFP Data
Divers
Thread ID:
01224919
Message ID:
01224919
Vues:
85
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform