ADO.NET - Populating multi-table dataset in MS Access
Posted on 2007-03-22
I'm trying to figure out how to populate a dataset with 2 tables in ADO.NET. The code below should work but it doesn't. It throws an exception at the line 'da.Fill(dSetWF)' saying 'Characters found after end of SQL statement.' I believe this is because microsoft Access doesn't allow multi statement queries. What is the best way to accomplish what I am trying to do?
Here is my code:
dSetWF = new DataSetWorkflow(); //dSetWF is a typed dataset
OleDbDataAdapter da = new OleDbDataAdapter("select * from workflow; select * from comments;", cnWF);