Adding a new record to a dataset
I am trying to add a record to a dataset that I have, the dataset itself is working fine and poulating the text boxes etc as required. However I am unable to add a new record the code I am using is below:-
Dim tblauthors As DataTable
tblauthors = dsdata.Tables("Jobs")
Dim drCurrent As DataRow
drCurrent = tblauthors.NewRow()
When I run this I get the error message:-
An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication4.exe
Additional information: Object reference not set to an instance of an object.
I am using an access database.
Thanks in Advance
Louisa
|