ValiantKhan
Member
- Joined
- Aug 4, 2003
- Messages
- 8
Allo, Im having some difficulty with displaying the next record in the database.
I have a DataSet DsUsers1 that has my users table in it.
I have a text box binded to a field name in my sql database.
On my Button Load click event I tell it to do --
"DsUsers1.Clear()
OdbcDataAdapter1.Fill(DsUsers1)"
Which works fine, and it displays the first record in my database. But when I go to display the next one by using the following code
"Me.BindingContext(DsUsers1, "Name").Position += 1"
it gives me error --
An unhandled exception of type System.ArgumentException occurred in system.windows.forms.dll
Additional information: Cannot create a child list for field Name.
Ive been getting that on all my navigation buttons, last, prev, next, first.
Any ideas on what im doing wrong?
And also another question -- When im using Me.BindingContext(DsUsers1, "Name") -- is there anyway i can tell it to update more than one field, say if i have a few more text boxes binded to different fields, and have it update those also when i click my next button?
Anywho, thanks for the help.
--Val
I have a DataSet DsUsers1 that has my users table in it.
I have a text box binded to a field name in my sql database.
On my Button Load click event I tell it to do --
"DsUsers1.Clear()
OdbcDataAdapter1.Fill(DsUsers1)"
Which works fine, and it displays the first record in my database. But when I go to display the next one by using the following code
"Me.BindingContext(DsUsers1, "Name").Position += 1"
it gives me error --
An unhandled exception of type System.ArgumentException occurred in system.windows.forms.dll
Additional information: Cannot create a child list for field Name.
Ive been getting that on all my navigation buttons, last, prev, next, first.
Any ideas on what im doing wrong?
And also another question -- When im using Me.BindingContext(DsUsers1, "Name") -- is there anyway i can tell it to update more than one field, say if i have a few more text boxes binded to different fields, and have it update those also when i click my next button?
Anywho, thanks for the help.
--Val