473,395 Members | 1,631 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,395 software developers and data experts.

Table Adapters

hi all

I have this line of code
KomfireTableAdapter Komfire = new KomfireTableAdapter
estimator.KomfireDataTable.....
I want the parts in brackets to be a variable
(Komfire)TableAdapter Komfire = new (Komfire)TableAdapter
estimator.(Komfire)DataTable table = (Komfire).getdata...............

So Komfire need to be variable
can that be done?

Thanks

Roger
Nov 16 '07 #1
3 1194

"Roger" <ro********@btinternet.comwrote in message
news:D1**********************************@microsof t.com...
hi all
I have this line of code KomfireTableAdapter Komfire = new
KomfireTableAdapter
estimator.KomfireDataTable..... I want the parts in brackets to be a
variable (Komfire)TableAdapter Komfire = new (Komfire)TableAdapter
estimator.(Komfire)DataTable table = (Komfire).getdata...............

So Komfire need to be variable can that be done?
this is not all clear, but:

it appears from line 2 that "Komfire" is the identifier for an instance of
the class KomfireTableAdapter; you can of course give the instance whatever
name you wish .... so in that sense, yes, it can be "variable"

as for the rest of it, I'm not sure what you're doing; Komfire is a member
of estimator??

I *think* what you're looking for is perhaps simpler:

DataTable tbl;

KomfireTableAdapter Komfire = new KomfireTableAdapter();
tbl = Komfire.getdata();

maybe ...........
Nov 16 '07 #2
thanks for the reply but i did not explain myself very well

Komfire is part of estimator, but there are a few otherm members.
what i was trying to do is us a selection varaible to create the line
(Komfire)TableAdapter

not sure if that makes any more senese

Roger

"Barrie Wilson" <bw*****@nowhere.comwrote in message
news:13*************@corp.supernews.com...
>
"Roger" <ro********@btinternet.comwrote in message
news:D1**********************************@microsof t.com...
>hi all
I have this line of code KomfireTableAdapter Komfire = new
KomfireTableAdapter
estimator.KomfireDataTable..... I want the parts in brackets to be a
variable (Komfire)TableAdapter Komfire = new (Komfire)TableAdapter
estimator.(Komfire)DataTable table = (Komfire).getdata...............

So Komfire need to be variable can that be done?

this is not all clear, but:

it appears from line 2 that "Komfire" is the identifier for an instance of
the class KomfireTableAdapter; you can of course give the instance
whatever name you wish .... so in that sense, yes, it can be "variable"

as for the rest of it, I'm not sure what you're doing; Komfire is a member
of estimator??

I *think* what you're looking for is perhaps simpler:

DataTable tbl;

KomfireTableAdapter Komfire = new KomfireTableAdapter();
tbl = Komfire.getdata();

maybe ...........

Nov 16 '07 #3


"Roger" <ro********@btinternet.comwrote in message
news:9F**********************************@microsof t.com...
thanks for the reply but i did not explain myself very well

Komfire is part of estimator, but there are a few otherm members.
what i was trying to do is us a selection varaible to create the line
(Komfire)TableAdapter

not sure if that makes any more senese

Not really.

If (Komfire)TableAdapter is a Type, have a look at
Activator.CreateInstance().

Nov 16 '07 #4

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

Similar topics

0
by: Bennett Haselton | last post by:
It seems whenever I add a new field to a database table that's queried by DataAdapters in my project, I get run-time errors because I don't go back and re-generate all the DataAdapters to read the...
0
by: Bruce HS | last post by:
I'd like my VB2005 code to be able to pass my WinForm Table Adapter to an ancestor object for processing (for instance doing generic logic about saving). However, it looks like Table Adapters...
1
by: Bruce HS | last post by:
I'm using VS2005, VB, WinForms I’ve developed forms using those nice wizards Microsoft provides. However, I’m running into a couple of complications trying to work with the resulting Table...
0
by: billy.murray | last post by:
I have a system which comprises 4 servers (1 server per plant area). Each plant area server has 2 databases (Config<nand Runtime<nwhere <nis the plant area number) and 1 web application which uses...
2
by: =?Utf-8?B?SmFtZXNJRURPVE5FVA==?= | last post by:
I have an application (ASP.NET 2.0/SQL Server 2005) which makes heavy use of table adapters for pulling records from SQL. Under heavy load, we get a lot of SQL Server Timeout errors. We have run a...
2
by: Simon | last post by:
Hi all, Is it somehow possible to do do batched updates with table adapters in the same way you can with data adapters? I expected the methods to be much the same but apparently not. If it...
12
by: Randy | last post by:
Hi, Trying to pass along a table row delete to the datasource, but I'm crashing. Here is the code: Private Sub btnDeleteIngr_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
0
by: gilbes | last post by:
I have been searching for a solution to this for a while now and everything I have found has lead me down the wrong path. Any assistance you guys could give would be much appreciated. I would...
4
by: dgk | last post by:
Should I dispose of table adapters and data tables and rows or do they garbage collect themselves?
4
by: =?Utf-8?B?TWFydGlu?= | last post by:
In Device Manager under Network Adapters, nearly all (about 20) items have a yellow warning symbol. The first item, Microsoft 6to4 Adapter says driver is up-to-date BUT says "This device is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...

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.