473,382 Members | 1,329 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,382 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 1760
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...

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.