473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

winapp: how to access tableadapter in dataset.xsd

nev
251 100+
i used the datasources wizard to add table "lamesa" to my dataset. if i view the xsd file, "lamesa" has a tableadapter named "lamesatableadapter".

but when i do msgbox(lamesa.defaultview.count.tostring) it is equal to 0. i have 5 records.

i want to code something like this to fill "lamesa"...

lamesatabledapter.fill(dataset.lamesa)

but i don't know how to reference the lamesatableadapter in the xsd file.

please help solve my problem. thank you.
Jan 10 '08 #1
5 9533
Shashi Sadasivan
1,435 Expert 1GB
Hi,
lamesatableadapter is considered as an object
so you have to create an object of it to access it.

the folowing should give you some idea
Expand|Select|Wrap|Line Numbers
  1. lamesatableadapter lamesaAdapter = new lamesatableadapter();
  2. lamesaTable lametable = new lamesaTable;
  3. lamesaAdapter.fill(lametable);
as you write this, intellisense whould guide you.

However please consider the namesapaces
Jan 10 '08 #2
nev
251 100+
Hi,
lamesatableadapter is considered as an object
so you have to create an object of it to access it.

the folowing should give you some idea
Expand|Select|Wrap|Line Numbers
  1. lamesatableadapter lamesaAdapter = new lamesatableadapter();
  2. lamesaTable lametable = new lamesaTable;
  3. lamesaAdapter.fill(lametable);
as you write this, intellisense whould guide you.

However please consider the namesapaces
thank you for the quick response. but wasn't this already created after i used the datasources wizard? i can view and click it in the xsd file. the wizard generated a datatable along with a tableadapter.

if i drag and drop the datatable or any of its field in my form, the tableadapter object will automatically be created in my form so i can simply do...

me.tableadapter.fill(dataset.datatable)

but since i did not dragndrop the datatable in my form, i cannot use the 'me'? which lead me to try to reference the tableadapter like this...

dataset.xsd*.tableadapter.fill(dataset.datatable)

which is of course dumb.

i hope anyone knows how to do this?
Jan 10 '08 #3
Shashi Sadasivan
1,435 Expert 1GB
Hi,
I havent used any other ORM tools (unfortunately been only working with SQL server)
however the whole concept of the XSD file is that it is also accompanied by a class file.
the class file contains the definitions for the table adapter.

have you chosen the right namespaces?
Jan 10 '08 #4
nev
251 100+
thank you, i added the component before accessing it.
Jan 11 '08 #5
nev
251 100+
wow! a couple days passed and i completely forgot how i added the component. i also dont know how to remove it again. it is a tableadapter component.
Jan 15 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Programatix | last post by:
Hi, Have anyone ever benchmark the TableAdapter performance compared to DataTable's Load method? I found out that the DataTable's Load method is about 10x faster than TableAdapter's Fill method....
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
3
by: Mike | last post by:
Dear Group, When I add a DataTable to a Typed Dataset, and a TableAdapter to the DataTable, I am able to create methods to send updates directly to the database (GenerateDBDirectMethods),...
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
1
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...
0
nev
by: nev | last post by:
I know when is best to use some templates but listed below are most that I don't know when is best to use or even know how to use: I am creating a windows application with mysql backend. 1....
1
by: Sreekanth | last post by:
I have a dataset with TableAdapter A and TableAdapter B. B has a foreign key which refer backs to A. I add a row to table A and then add several rows to Table B. I update ID of table A of table...
0
by: Tony Johansson | last post by:
Hello! Is it always that a TableAdapter and a DataTable is a pair. When I use the Dataset Designer and create a sql clause a TableAdapter and a DataTable is created which act like a pair. I...
2
by: Patrick Pirtle | last post by:
Having programmed for a number of years with VB6 (but very little database stuff), I'm trying to learn Visual Studio, but am just about at the end of my rope as far as wrapping my mind around...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.