Link to home
Start Free TrialLog in
Avatar of jampost
jampostFlag for United States of America

asked on

CustomerDataSet is not a member of sa.Form1 [vb 2008 to SQL 2008 connection issue]

Program used: Visual Studio 2008 Standard edition using Visual Basic 2008
Database used: SQL Server 2008 Developer edition
Problem to be solved: error message on line of code in project “sa” Form1
Data sources are CustomersDataSet & OrdersDataSet  and both are visable under the Data Sources window.
The code:
Me.TableAdapterManager1.UpdateAll(Me.CustomerDataSet)    

The error message is:
CustomerDataSet is not a member of sa.Form1

DataSetError.pdf
Avatar of John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou
Flag of Greece image

Instead Of CustomerDataset use CustomerDataset1
u are using TableAdapterManager1 with CustomerDataset
Replace it with
Me.TableAdapterManager1.UpdateAll(Me.CustomerDataSet1)    
You have 2 set of everything ..
2 Table adapter manager ,2 datasets,2 bindinsources
So or use:
Me.TableAdapterManager1.UpdateAll(Me.CustomerDataSet1)    
or
Me.TableAdapterManager.UpdateAll(Me.CustomerDataSet)
 
Avatar of jampost

ASKER

Thank you "itoutou",

You are right about 2 sets of everything. I tried eliminating the extra one and things stop working.
I tried:

Me.TableAdapterManager.UpdateAll(Me.CustomerDataSet)
 
Me.TableAdapterManager1.UpdateAll(Me.CustomerDataSet1)

 I also tried both of those lines with customers instead of customer, eliminating the 1 on one end and having it on the other.
 It looks like the answer is elsewhere in the program. I was just thinking that the error message might give a clue.  I guess if it were easy, everybody would be programers.

 
ASKER CERTIFIED SOLUTION
Avatar of John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jampost

ASKER

    I suppose it is like restarting the PC. it fixes everything. I deleted everything for the Customer and reinstalled the comboBox from the Data Source which automatically installed all the Binding source, Data set, table adapter and table adapter manager. error gone. Thank you.
Glad i helped you!!