anyone did IDbConnection and IDbDataAdatper before?

  • Thread starter Thread starter pei_world
  • Start date Start date
P

pei_world

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
 
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!
 
Back
Top