Hi Aland,
Thanks for that. To be honest, I don't really want to create my own tableadapters, but just want to understand what is going on here.
Essentially, I am trying to load a form which contains various combo boxes and date ranges, which requires data from 4 particular tables.As such, on loading the form, the following code is meant to populate the dataset. This works for 3 of the tables, just not the tblExpenseRecords table.
If I comment out the tblExpenseRecord row, the code works absolutely fine (i.e. table adaptors don't throw errors), so there is something I'm doing wrong with the expense records table. I added the tableadaptor etc in the exactly same manner (by dragging the table from the datasource onto the form etc).
The code is as follows:
Me.TblIncomeRecordsTableAdapter.Fill(Me.PCMDataSet.tblIncomeRecords)
Me.TblExpenseRecordsTableAdapter.Fill(Me.PCMDataSet.tblExpenseRecords)
Me.TblIncomeCategoriesTableAdapter.Fill(Me.PCMDataSet.tblIncomeCategories)
Me.TblExpenseCategoriesTableAdapter.Fill(Me.PCMDataSet.tblExpenseCategories)
The error takes me to the dataset designer code (i.e. PCMDataSet.Designer.vb tab):
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlServerCe.SqlCeCommand()
Get
If (Me._commandCollection Is Nothing) Then
Me.InitCommandCollection
End If
Return Me._commandCollection
End Get
End Property
And shows the error on Me.InitCommandCollection.
Hope this helps highlight the error. I'm struggling to understand why the other tables dont have the same problem......
If it helps diagnose the problem, this same problem occurs on other forms with only this table....?
Thanks so much :-).