Batch Queries with OLEDB

H

H. Williams

I'm trying to use a batch SQL statement with an OleDbDataReader and the
NextResult method.

I tried: "SELECT Pages FROM Documents ; SELECT Date FROM Orders;"
However, I get the error: "Characters found after end of SQL statement. "
If I try removing the semicolon I get "Syntax Error in Query Expression."

My database is a Microsoft Access 2000 mdb file and the code is running in
ASP.NET.

What am I doing wrong?
 
J

Jim Hughes

Date is a reserved word, use a different column name

or change the query to SELECT [Date] FROM Orders
 
H

H. Williams

Changing Date does NOT make any difference.
Does the ADO.NET not support batch queries with Microsoft Access?

Jim Hughes said:
Date is a reserved word, use a different column name

or change the query to SELECT [Date] FROM Orders

H. Williams said:
I'm trying to use a batch SQL statement with an OleDbDataReader and the
NextResult method.

I tried: "SELECT Pages FROM Documents ; SELECT Date FROM Orders;"
However, I get the error: "Characters found after end of SQL statement.
"
If I try removing the semicolon I get "Syntax Error in Query Expression."

My database is a Microsoft Access 2000 mdb file and the code is running
in ASP.NET.

What am I doing wrong?
 
H

H. Williams

Nevermind, Microsoft's ADO.NET reference states that Microsoft SQL server
supports batch queries, but Oracle and Microsoft Access databases do NOT.


H. Williams said:
Changing Date does NOT make any difference.
Does the ADO.NET not support batch queries with Microsoft Access?

Jim Hughes said:
Date is a reserved word, use a different column name

or change the query to SELECT [Date] FROM Orders

H. Williams said:
I'm trying to use a batch SQL statement with an OleDbDataReader and the
NextResult method.

I tried: "SELECT Pages FROM Documents ; SELECT Date FROM Orders;"
However, I get the error: "Characters found after end of SQL statement.
"
If I try removing the semicolon I get "Syntax Error in Query
Expression."

My database is a Microsoft Access 2000 mdb file and the code is running
in ASP.NET.

What am I doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top