473,503 Members | 10,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

Dec 1 '05 #1
3 1051
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

Dec 1 '05 #2
Hi,

"dbuchanan" <db*********@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro 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

Dec 1 '05 #3
Thank you

Dec 1 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
1943
by: CMM | last post by:
Let me preface by saying that I like VS2005. It improves on many things lacking in VS 2003 and takes pretty much nothing away. Having said that, I am a little underwhelmed by it. Despite a...
1
2736
by: dbuchanan | last post by:
Hello, A section in Data Sources window is mystifying to me. In the case of my code the Data Sources window shows my references to the data access layer. First here is what I see in my Data...
0
1146
by: dbuchanan | last post by:
Hello, I used the wizard to create my dataset xsd in my data layer project. I then added a column to the database table. I tried several ways to refresh the TableAdapter with no success. *I...
5
1980
by: GaryDean | last post by:
(my original post was inaccurate but this post accurately describes what I think is a very bad vs2005 bug) short description... Deleting a dataset and recreating it from the dataadapter causes...
2
1861
by: Bob | last post by:
I have noticed that as one adds related tables to a bindingsource and dataset(vs2005 Vb.Net Sql Server 2005), the TODO and following code that fills the datasets on form load are written to the...
1
4531
by: Demetri | last post by:
I have a question / concern regarding the new suggested way of creating a data access layer in an n-tier application. Typically, a web application specifically, using the SOA (Service Oriented...
5
1367
by: AAJ | last post by:
Hi all FIRST THE BORING BITS....... I normally use a Database layer, a Business layer and a GUI layer. The GUI uses an Object data source to bind to the Business layer which in turn binds...
7
27808
by: Dale Sampson | last post by:
As you can tell, I am new to VS.net. I have a VB project with a defined data source pointing to a table in a ..mdb file.-- The associated fields are displayed in textboxes using the...
21
2390
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.