Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with CommandBuilder
Message
From
27/11/2004 18:43:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00965146
Message ID:
00965163
Views:
16
>When I use the oAD.Update (Adapter command update) i get the folowing:
> The Data Adapter.Select command parameter needs to be initialised.
>
>I added in a :
>oAD.SelectCommand = "Select * from mytable" but I get an error saying canot assign a string to an adapater....
>
>This is happening in a Save Method of an Object, where I have the commandbuilders Insert,Update and Delete properties set. In a GetDataset method of the object I have following code:
> OleDbDataAdapter oAd = new
> OleDbDataAdapter("SELECT "+this.sFields+
> " FROM "+this.sTableName,oCon);
>which I presume is initializing a 'Select' property ?
>
>I am unclear as to what the error message means . Is there a separate 'Select' property somewhere ?
>
>Regards,
>
>Gerard

Gerard,
Check your oledb source and generated code.
With some oledb providers UpdateCommand doesn't get automatically generated and you've to do it by yourself (ie: VFPOLEDB). If you're using VFPOLEDB then keep in mind parameters are recognized by their oreder and not by name.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform