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

anyone did IDbConnection and IDbDataAdatper before?

I am create an generic class for Database access using these interfaces.
I run my program with the idea of IDbConnection and IDbDataAdatper without
any problem in single table.
But since IDbDataAdatper's Fill method only takes DataSet as parameter, so I
can define my table name in the dataset for later use. at the moment I am
using id number of table in the dataset, and when I try to call my second
table it fail. I think system overwrite my first table.
can anyone tell me how to do it? some sample code will be please!
thanks
pei
Nov 16 '05 #1
1 1761
Sorry to everyone I just got the solution,

MyDataAdapter.Fill(DS);
DS.Tables[DS.Tables.Count-1].TableName=TableName;//whatever your function
pass in

sorry again!
"pei_world" <pe*******@hotmail.com> wrote in message
news:eE**************@tk2msftngp13.phx.gbl...
I am create an generic class for Database access using these interfaces.
I run my program with the idea of IDbConnection and IDbDataAdatper without
any problem in single table.
But since IDbDataAdatper's Fill method only takes DataSet as parameter, so I can define my table name in the dataset for later use. at the moment I am
using id number of table in the dataset, and when I try to call my second
table it fail. I think system overwrite my first table.
can anyone tell me how to do it? some sample code will be please!
thanks
pei

Nov 16 '05 #2

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

Similar topics

4
by: Kim Petersen | last post by:
I've worked on this table object a bit too long - and seem to have stared too long at the code. Can someone see where it goes wrong in the insertrow function? Also optimization hints and...
3
by: faktujaa | last post by:
Hi All, A small confusion. I have defined a connection class that has System.Data.IDbConnection as a member variable and implements IDisposable interface. I have implemented Dispose method to call...
1
by: pei_world | last post by:
I am create an generic class for Database access using these interfaces. I run my program with the idea of IDbConnection and IDbDataAdatper without any problem in single table. But since...
0
by: karunakar | last post by:
Hi all Iam trying to connect the SQL & sybase These dabases need to connect the Same Code I have littile bit idea of this But iam not able to populate the Datagrid Using "IDBConnection" and...
40
by: Jeff | last post by:
I have a system on a network and want to determine if anyone is currently connected to the back-end files. An interesting twist is that I have noticed that some users can be connected (have the...
5
by: spookyu | last post by:
Alright, I'm sure your tired to hearing this but...does anyone know of any GOOD tutorial's for learning c#. The more basic the better, I have NO experience with programing before this other than...
2
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
0
by: Ryan Liu | last post by:
Hi, I downloaded the latest version of mysql 5.0 and its .NET driver, I copied the sample code from mysql 5.0 manual to do use prepared statement in C#. But indeed I got a run time error say...
3
by: Peter Kirk | last post by:
Hi do I need to explicitly close IDbConnection and IDbCommand objects? Or are they disposed of when the method they are used in ends? Normally I use a construct like: using (IDbConnection...
8
by: JoeW | last post by:
I normally use SqlConnection, SqlDataReader, SqlCommand for most of my queries but recently a friend of mine who is a long time java programmer suggested I use the IDbConnection, IDbCommand...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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.