Batch Queries with OLEDB

  • Thread starter Thread starter H. Williams
  • Start date Start date
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?
 
Date is a reserved word, use a different column name

or change the query to SELECT [Date] FROM Orders
 
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?
 
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?
 
Back
Top