|
-
Sep 25th, 2002, 10:13 PM
#1
Thread Starter
Addicted Member
Two Database Queries
ok, I can run one database query easy enough, but what if I want to run a second query (a different one) right after on the same database, do I need to recreate a whole new set of variables? Here is kinda what I want to do....
string strConnection = "server=localhost; uid=; pwd=; database=DBr";
string strCommand = "SELECT * FROM Table 1";
SqlDataAdapter dataAdapter = new SqlDataAdapter(strCommand,strConnection);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet,"WebLog");
SqlCommandBuilder bldr = new SqlCommandBuilder(dataAdapter);
DataTable dataTable = dataSet.Tables[0];
now I want to query the same database again with a different strCommand.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|