View Full Version : ASP.NET Filling Dataset

01-10-2005, 04:54 AM
I need to fill a dataset with multiple resultsets. I found online examples like this -
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM customers;" + "SELECT * FROM products", connectionString);

But they all have been written in C# for SQL Server.
When I try it in VB.NET using OleDB -

OleDBDataAdapter da = new OleDBDataAdapter("SELECT * FROM customers;" + "SELECT * FROM products", connectionString)

I get an error "Characters found after the end of the SQL statement"
Does anybody know how to make it working? Thanks

01-10-2005, 10:44 AM
if u r using access 2 SELECT will not work

to be shure of what you are doing try >

Dim Query As string = "SELECT * FROM customers;" + "SELECT * FROM products"

Throw new Exception(Query)

OleDBDataAdapter da = new OleDBDataAdapter(Query, connectionString)

then copy paste exactly the thrown Query in your Database and you will see

the problem comes from 1 select after another one

you coould fill your dataset with a for each Query as string in Queries ....

01-10-2005, 06:17 PM
Thanks gwendaal