wayko Posted December 15, 2003 Posted December 15, 2003 I have a windows form that access a database I am able to get the first and last records but i want to get the next and previous records i tried Me.BindingContext(Me.DataSet81.Distribution_List.IDColumn, "ID").Position += 1 and Me.BindingContext(Me.DataSet81.Distribution_List.IDColumn, "ID").Position -= 1 but i get an error An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: Can't create a child list for field ID. is there a way to do it? Quote
Leaders quwiltw Posted December 17, 2003 Leaders Posted December 17, 2003 You sure that "ID" is the name of that column? Quote --tim
wayko Posted December 17, 2003 Author Posted December 17, 2003 Yes I even went to the database copy the column header and paste it right into the code but i did a work around its not the right way of doing it but it works what i did was i got the id into a textbox and wrote out a new code Dim num = TextBox7.Text If num = "" Then MsgBox("error no number") first() MsgBox("Have Re-loaded from begining") Else DataSet61.Clear() OleDbDataAdapter6.SelectCommand.Parameters("ID").Value = num - 1 OleDbDataAdapter6.SelectCommand.Connection.Open() Try OleDbDataAdapter6.SelectCommand.ExecuteNonQuery() OleDbDataAdapter6.Fill(DataSet61) Catch ex As Exception MsgBox(ex.Message) End Try OleDbDataAdapter6.SelectCommand.Connection.Close() but it should have worked normally it kinda worked with a dataview but it only showed one record all the time Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.