Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server text to Foxpro memo
Message
De
30/04/2006 06:59:58
 
 
À
28/04/2006 17:29:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01117414
Message ID:
01117876
Vues:
15
Bonnie,

The full error description was "syntax error" and happened for

command.ExecuteNonQuery();

I had a look at examples provided by Cetin and played a little bit with my code and ended up with :

This one upsets ExecuteNonQuery
command.CommandText = "INSERT INTO mytable ( blob ) VALUES( @blob ) ";
That one doesn't
command.CommandText = "INSERT INTO mytable ( blob ) VALUES( ? ) ";
The only reason I used the former syntax initially was just seeing an example on the Internet.

Michael

>Where and what is your syntax error?
>
>~~Bonnie
>
>
>
>>Just wondering how to transform long string from SQL Server( datatype text ) to Foxpro memo fields. String may contain anything : single quote , double quote , square brackets.
>>
>>The snippet below gives a syntax error perhaps due to this complication :
>>
>>
>> OleDbParameter pField1 = new OleDbParameter("@blob", OleDbType.BSTR);
>> while (oSQLReader.Read())
>>{
>>
>>
>>  pField1.Value = oSQLReader.GetValue(column1);
>>
>>  command.CommandText = "INSERT INTO mytable ( blob ) VALUES( @blob ) ";
>>
>>  command.Parameters.Add(pField1);
>>
>>  int effected = command.ExecuteNonQuery();
>>}
>>
>>
>>TIA
>>Michael
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform