jmc,
I download and installed the Type Dataset demo. It works great. I was able to add a new form and use your dataset to mimic what how your form performed.
I ran into problems when I tried to add a new datasource and modify it to work like yours.
I cut and pasted the "GetLastautonumber" functions. It was giving me an invalid index error in "parentAdapter_RowUpdated" when it call "GetLastAutoNumber" . I added this code to each tableadapter,
Code:
Me._commandCollection(1) = New Global.System.Data.OleDb.OleDbCommand()
Me._commandCollection(1).Connection = Me.Connection
Me._commandCollection(1).CommandText = "SELECT @@IDENTITY"
Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
and increased the _commandcollection array, like it was in your dataset,
Code:
Me._commandCollection = New Global.System.Data.OleDb.OleDbCommand(1) {}
This solved the index error but then I got a casting error on this line,
Code:
DirectCast(e.Row, ParentChildDataSet.ParentRow).ParentID = lastAutoNumber
Am I on the right track with my approach or have I missing something important. I made the mistake of modifying the relationship in the dataset designer and it removed all the code I had added.
So I just want to no if I was headed in the right direction and what other code need to be added to the dataset designer file before I start over again.
thanks