Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Openquery returns 2 rows only

Author  Topic 

Mathias
Posting Yak Master

119 Posts

Posted - 2005-10-04 : 02:34:54
I am using Client Access ODBC driver 32 bits to access DB2 on AS400. When I do a

select * from openquery(MERCURY,'select * from TABLE1') it returns only 2 rows even if the table has hundred of rows.

Any clue?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-04 : 03:02:45
Did you set RowCount to 2 and forgot to reset to 0?

Try this

Set Rowcount 0
select * from openquery(MERCURY,'select * from TABLE1')



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Mathias
Posting Yak Master

119 Posts

Posted - 2005-10-04 : 03:05:19
Hi,
I tried but it doesn't change anything, I still retrieve only 2 rows.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-10-04 : 03:22:20
Try putting the table owner in too?

select * from openquery(MERCURY,'select * from dbo.TABLE1')

Kristen
Go to Top of Page

Mathias
Posting Yak Master

119 Posts

Posted - 2005-10-04 : 07:15:40
I found the problem : it is at the ODBC entry setup level where the enable lazy close, enable pre fetch and enable data compression needs to be unchecked in order for the client access to behave properly.
Thanks,
Mathias
Go to Top of Page
   

- Advertisement -