Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem updating VFP data from C#
Message
De
30/08/2003 16:10:20
 
 
À
30/08/2003 14:45:47
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00824832
Message ID:
00824845
Vues:
17
Kevin,

I'm not using a VFP backend and so I don't know for sure what your problem is (you may be right that there's a limitation as to the size of the command string), but if you need a workaround and if the VFPOLEDB provider allows transactions (again, I don't know if it does or not), you could send the update back in pieces, several commands, wrapped in a transaction. Kludgey, yes, but if there's no other way at least this will work (assuming you can use transactions).

~~Bonnie



>I'm using the newest driver for VFP, and am having a problem [and I suspect this would have occured using prior versions]...
>
>I have a VFP table with about 30 columns. In my C# app, I build a fairly long UPDATE string...when I try to do the update [as follows]...
>
>oConn = new OleDbConnection("Provider=VFPOLEDB.1;" + "Data Source=mydata.dbc");
>
>oConn.Open();
>OleDbCommand MyCommand = new OleDbCommand();
>MyCommand.Connection = oConn;
>MyCommand.CommandText = cUpdateCmd; // long update command
>MyCommand.ExecuteNonQuery();
>
>...I get an 'unhandled exception' message...if I take the string for 'cUpdateCmd' and paste it into the VFP command window, I get 'unrecognized command'. It seems there's a limit on a string.
>
>If I shorten the update string to maybe a 3rd of the columns, it works...but it just seems that a long update string back to a VFP data source isn't supported.
>
>Any suggestions/feedback? Thanks.
>Kevin
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform