Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem Updating VFP table
Message
De
31/03/2009 08:03:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01392291
Message ID:
01392330
Vues:
38
>Hi.
>I have following command and am getting a Syntax Error on execution
>I tried with Int and Int.Tosting but both give the error
>(PAR_NUM is a n(10,0) FIELD IN A vfp TABLE
>
> // ParCmd.Parameters.AddWithValue("@PAR_NUM", intNumber);
> ParCmd.Parameters.AddWithValue("@PAR_NUM", intNumber.ToString().Trim());
>
> ParCmd.CommandText = "UPDATE WPPAR SET PAR_NUM = @PAR_NUM where PAR_PK = 1";
> ParCmd.ExecuteNonQuery();
>Any help appreciated
>Regards,
>Gerard
ParCmd.CommandText = "UPDATE WPPAR SET PAR_NUM = ? where PAR_PK = 1";
and you don't need to convert an int to a string (would error if that is numeric on VFP):
ParCmd.Parameters.AddWithValue("@PAR_NUM", intNumber);

ParCmd.CommandText = "UPDATE WPPAR SET PAR_NUM = ? where PAR_PK = 1";
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform