Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > VS2005 - How to connect to a TableAdapter in the data layer

Reply
Thread Tools

VS2005 - How to connect to a TableAdapter in the data layer

 
 
dbuchanan
Guest
Posts: n/a
 
      12-01-2005
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.datas ource
---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

 
Reply With Quote
 
 
 
 
dbuchanan
Guest
Posts: n/a
 
      12-01-2005
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.lk pDeviceTypeDataTable)
//

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

 
Reply With Quote
 
 
 
 
Bart Mermuys
Guest
Posts: n/a
 
      12-01-2005
Hi,

"dbuchanan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>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.lk pDeviceTypeDataTable)


It shouldn't end with 'DataTable' otherwise it's a typed DataTable _class_,
what you need is a property on the Typed DataSet that returns an _instance_
..

Try:
Me.LkpDeviceTypeTableAdapter1.Fill(Me.DataSet11.lk pDeviceType)

Note that when you have made a Data Source ( Menu->Data->Show Data Sources /
Add New Data Source ) you can drag one of the DataTable's to the Form and
everything will be setup for you, you can always use it to look at the
generated code to see how things should be done.


HTH,
Geetings



> //
>
> 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
>



 
Reply With Quote
 
dbuchanan
Guest
Posts: n/a
 
      12-01-2005
Thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
business layer, data access layer , presentation layer for asp.net using C#.net Dhananjay ASP .Net 1 12-18-2006 11:35 PM
Business Layer, Data Layer, Speed Issues, Classes, and all that et ASP .Net 2 03-06-2006 02:46 PM
vs2005 - How to fill form using TableAdapter FillBy dbuchanan ASP .Net 0 12-13-2005 12:43 AM
VS2005 - Newbie - TableAdapter not configured, but it updates!! dbuchanan ASP .Net 0 12-12-2005 10:41 PM
Using transparent layer for data input (glassPane?) over another layer Wolfgang Java 1 05-01-2004 03:09 AM



Advertisments