well I would assume you would save the database connection string in the webconfig file to avoid issues later on when changing things around. but if you are going to run 4 queries on a single page do you run the first line more than once, and do you create multiple dataset objects or can you reuse...
thanks very much...
Main Topics
Browse All Topics





by: nouloukPosted on 2007-12-21 at 10:10:36ID: 20515305
Hi mrferrari,
+ "Data Source=C:\\Program Files\\Microsoft Office\\Office\\Samples\\N orthwind.m db");
5 lines for me to fill your dataset:
OleDbConnection con= new OleDbConnection ("Provider =Microsoft.JET.OLEDB.4.0;"
DataSet myDataSet = new DataSet();
OleDbCommand CommandObject = new OleDbCommand ("Select * from employee");
OleDbAdapter myDataAdapter = new OleDbAdapter (CommandObject, con);
myDataAdapter.Fill (myDataSet, "EmployeeData");
Hope this helps.