PC Review


Reply
Thread Tools Rate Thread

BindingManagerBase not working with stored procedures

 
 
=?Utf-8?B?RGF2ZQ==?=
Guest
Posts: n/a
 
      4th Sep 2006
I have a BindingManagerBase which is used witha stored precudure. When I try
to execute the statement:
this.BindingContext[dataset1, "table1"]

I get the error: System.ArgumentException was unhandled. Message="Child
list for field table1 cannot be created."

L. A. Jones
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      4th Sep 2006
Dave,

Can you show the code that you are using that sets the data source on
your control? Without seeing that, it's hard to say.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Dave" <(E-Mail Removed)> wrote in message
news:40D699AA-C670-44C3-BFC3-(E-Mail Removed)...
>I have a BindingManagerBase which is used witha stored precudure. When I
>try
> to execute the statement:
> this.BindingContext[dataset1, "table1"]
>
> I get the error: System.ArgumentException was unhandled. Message="Child
> list for field table1 cannot be created."
>
> L. A. Jones



 
Reply With Quote
 
=?Utf-8?B?RGF2ZQ==?=
Guest
Posts: n/a
 
      4th Sep 2006
BindingManagerBase bmProduct
bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];


this.cmbProduct.DataSource = this.dsfrmRestock_ProductSelect1;
this.cmbProduct.DisplayMember = "frmRestock_ProductsSelectCommand.Name";
this.cmbProduct.ValueMember = "frmRestock_ProductsSelectCommand.Barcode";
bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];
 
Reply With Quote
 
=?Utf-8?B?RGF2ZQ==?=
Guest
Posts: n/a
 
      4th Sep 2006

Sorry, I didn't state that the error is on last line below.

BindingManagerBase bmProduct
bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];


this.cmbProduct.DataSource = this.dsfrmRestock_ProductSelect1;
this.cmbProduct.DisplayMember = "frmRestock_ProductsSelectCommand.Name";
this.cmbProduct.ValueMember = "frmRestock_ProductsSelectCommand.Barcode";
bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];
 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      5th Sep 2006
Dave,

That's the problem. You are setting the data source to
"this.dsfrmRestock_ProductSelect1", and then getting the BindingContext for
the "Product" member in "this.dsfrmRestock_ProductSelect1". Your call
really needs to be:

bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1];

That will give you the appropriate binding context.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Dave" <(E-Mail Removed)> wrote in message
news:82F0257D-AE4B-4942-B1EF-(E-Mail Removed)...
>
> Sorry, I didn't state that the error is on last line below.
>
> BindingManagerBase bmProduct
> bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];
>
>
> this.cmbProduct.DataSource = this.dsfrmRestock_ProductSelect1;
> this.cmbProduct.DisplayMember = "frmRestock_ProductsSelectCommand.Name";
> this.cmbProduct.ValueMember = "frmRestock_ProductsSelectCommand.Barcode";
> bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
working with datasets and stored procedures Aussie Rules Microsoft VB .NET 0 29th Dec 2007 05:15 PM
Map Stored Procedure dependencies from ASP pages through methods to stored procedures dwilliams@newportgroup.com Microsoft Dot NET 6 18th Mar 2005 03:02 AM
Map Stored Procedure dependencies from ASP pages through methods to stored procedures dwilliams@newportgroup.com Microsoft ADO .NET 2 17th Mar 2005 12:47 PM
Error: Executing Stored Procedures-- Cannot Pass TimeStamp Values From sqlCommand Object Parameter to A SQL Stored Procedure =?Utf-8?B?VGVjaE1E?= Microsoft ADO .NET 3 17th Mar 2004 04:03 AM
working with agrregate functions and stored procedures sirshannon Microsoft Access Forms 0 17th Dec 2003 01:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:56 AM.