Groups | Blog | Home
all groups > dotnet faqs > november 2005 >

dotnet faqs : VS2005 - How to connect to a TableAdapter in the data layer



dbuchanan
11/30/2005 4:59:15 PM
Here are pertinent parts of my solution structure
\\
Solution 'QMS_01
-QmsDataLayer
---My Project
---app.config
---DataSet1.xsd
-QmsUI
---My Project
------DataSources (folder)
---------QmsDataLayer.DataSet1+lkpDeviceTypeDataTable.datasource
---References
------QmsDataLayer
---Form1
//

In the DataSet of the QmsDataLayer is a DataTable (lkpDeviceType) that
has its "LkpDeviceTypeTableAdapter" configured for the stored
procedures in SQL Server 2000 for Fill and GetData.

On "Form1" in the user interface layer (QmsUI) is a DataGridView whose
source is "lkpDeviceTypeTableAdapterBindingSource"

In Form1 component tray I have
\\
lkpDeviceTypeTableAdapterBindingSource
DataSet11
LkpDeviceTypeTableAdapter1
//

This code is not accepted
\\
LkpDeviceTypeTableAdapter.Fill
//

What am I missing?

dbuchanan
dbuchanan
11/30/2005 6:25:01 PM
I Got a little further...

After playing around a bit with the data layer, the references and also
reviewing other code I was able to enter the following code;

\\
Me.LkpDeviceTypeTableAdapter1.Fill(Me.DataSet11.lkpDeviceTypeDataTable)
//

But it does not accept the last part...
(Me.DataSet11.lkpDeviceTypeDataTable)
There is the squiggle under it an the error says

"'lkpDeviceTypeDataTable' is a type in 'QmsDataLayer.DataSet1' and
cannot be used as an expression"

What do I do next?

dbuchanan
AddThis Social Bookmark Button