Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OleDb Parameters
Message
De
28/09/2004 03:10:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/09/2004 00:16:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00946213
Message ID:
00946557
Vues:
22
>All are fine until I issue
>
> daPaper.Fill(dsPaper, "paperoll");
>
>
>If I using the selectCmd as follow then the daPaper.Fill will work fine.
>
> String selectCmd = "select * from paperoll where supNo = 'PM'";
>
>
>So I suspect I parameter statement got problem :
>
> String selectCmd = "select * from paperoll where supNo = ?pSupNo";
> OleDbDataAdapter daPaper = new OleDbDataAdapter(selectCmd, oleDbConnection1);
>
> daPaper.SelectCommand.Parameters.Add(new OleDbParameter("pSupNo",OleDbType.Char,5));
>
> daPaper.SelectCommand.Parameters["pSupNo"].Value = "PM";
>
> DataSet dsPaper = new DataSet();
> daPaper.Fill(dsPaper, "paperoll");
>
>
>Could u pls show me a example how to oledbparameter with VFP table?
>
>TIA.

I'm not a .NET expert but I think the culprit is in supplying a name in parameter. Would you try this:

String selectCmd = "select * from paperoll where supNo = ?";

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform