SQL Server batch in pass-through returns no records

  • Thread starter Thread starter Rob Rutherford
  • Start date Start date
R

Rob Rutherford

I'm trying to execute a batch of T-SQL statements in an Access pass-through query. In short, the batch creates and populates a
temporary table and ends with a select * ... on the temporary table. It works fine in SQL Server's query analyzer, but returns no
records when I run it as an Access pass-through query. Am I right in expecting that I should be able to get this to work?
 
Rob Rutherford said:
I'm trying to execute a batch of T-SQL statements in an Access
pass-through query. In short, the batch creates and populates a
temporary table and ends with a select * ... on the temporary table. It
works fine in SQL Server's query analyzer, but returns no
records when I run it as an Access pass-through query. Am I right in
expecting that I should be able to get this to work?
Have you set ReturnsRecords to True on the Access query object?
 
Yes it is. Does your question imply that there as far as you know there is no fundamental reason why you can't return records by
using a select statement at the end of a batch?
 
Rob Rutherford said:
Yes it is. Does your question imply that there as far as you know there is
no fundamental reason why you can't return records by
using a select statement at the end of a batch?

There is no reason why you can't do this. Please post your code.
 
Thanks. If it should be possible then I'll have a closer look at it tomorrow to see if I can work out what's happening. If I can't
resolve it I'll post the code.
 
Back
Top