A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Pass Through Query - not returning rows



 
 
Thread Tools Display Modes
  #1  
Old March 8th, 2010, 09:38 AM posted to microsoft.public.access.queries
Gary Watson
external usenet poster
 
Posts: 9
Default Pass Through Query - not returning rows

I've written some SQL, which when run on SQL Server 2005 returns rows.
Plugged this SQL into an Access 2003 pass through query, but when run it
reports an error saying pass through query with return records set to true
did not return any records.

I've got other pass through queries in this Access database that work fine.

The SQL in this query is more complicated and creates a temp table - could
this be causing the problem?
  #2  
Old March 8th, 2010, 09:51 AM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Pass Through Query - not returning rows

hi Gary,

On 08.03.2010 10:38, Gary Watson wrote:
The SQL in this query is more complicated and creates a temp table - could
this be causing the problem?

Yes, indeed.

My crystal ball says that you're missing the mandatory NOCOUNT for
multiple result sets, test it against any database, I used tempdb:

SET NOCOUNT ON;

DECLARE @user TABLE ( username SYSNAME ) ;

INSERT INTO @user ( username )
VALUES ( SUSER_SNAME() ) ;

SELECT *
FROM @user ;


mfG
-- stefan --
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.