473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Return records through a linked server that uses ODBC data source

Hi,

I used sp_addlinkedserver to link to a remote server through ODBC.
When I execute select count(*) from LinkSrv.SI.DBO.SIHeader in SQL Query
Analyzer. It returns 13705 records. But when I execute select * from
LinkSrv.SI.DBO.SIHeader. It only return 885 records. If I specify some
columns, select ODCOMP, ODPONO, ODVDCD from LinkSrv.SI.DBO.SIHeader.
It returns more records, 1213 records.

I guess there is something limit the return storage, but I can not
find it.

Any suggestion will be appreciated. Thank you
Jul 20 '05 #1
3 2668
Lance (wi******@21cn.com) writes:
I used sp_addlinkedserver to link to a remote server through ODBC.
When I execute select count(*) from LinkSrv.SI.DBO.SIHeader in SQL Query
Analyzer. It returns 13705 records. But when I execute select * from
LinkSrv.SI.DBO.SIHeader. It only return 885 records. If I specify some
columns, select ODCOMP, ODPONO, ODVDCD from LinkSrv.SI.DBO.SIHeader.
It returns more records, 1213 records.

I guess there is something limit the return storage, but I can not
find it.


Judging from the names, the remote server is SQL Server as well. Any
particular reason that you are using the MSDASQL provider, and not
SQLOLEDB?

There is no reason that you should not get all rows back, so something
is indeed fishy here. But not knowing anything about the systems it is
difficult to tell. What does SELECT @@version say on the two boxes?

If you query the tables on the local server, do you get the correct result
then?
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
I am using MSDASQL to link to a AS400/DB2. Now, I think I have found
the answer. I tried to change some configure in ODBC. The records of
result set have been changed. So this problem is caused by ODBC DB2
drive provided by IBM. Anyway, thank you.
Jul 20 '05 #3
Lance (wi******@21cn.com) writes:
I am using MSDASQL to link to a AS400/DB2. Now, I think I have found
the answer. I tried to change some configure in ODBC. The records of
result set have been changed. So this problem is caused by ODBC DB2
drive provided by IBM. Anyway, thank you.


Thanks for reporting back. Permit me to point out that it's always a
good idea to give complete information. (Of course, I should have guess
from that wretched column names that it was an AS400. Our competitors
system looks like that too. :-)

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Gray | last post by:
Hello all, Having problems connecting to an Oracle 9i database from within SQL/Server 2000 using the Security/Linked Servers feature. Server1 (SQL/Server) ----------- Windows Server 2003,...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
4
by: pheonix1t | last post by:
hello, I'm trying to create a linked server from an SQL2000 to a Unify ELS (very old, odbc is version 1) database on SCO unix. The odbc driver is old but it works fine when used by applications...
1
by: annie | last post by:
Hi all, I have recently ported my Access 2000 app to SQL Server, keeping the Access client as the front end using linked tables. I am also using triggers on my SQL tables to trap orphan...
3
by: Oren | last post by:
Hi, Is there a way to hide the connection information of linked SQL Server tables from users? It's easy to open a system table and find the connection info, and if the username and password are...
6
by: Lewis Veale | last post by:
I have an Access 2000 front-end pointing at a SQL Server backend, with around 80 linked tables and views. I frequently need to point the front-end at different versions of the back-end, and achieve...
5
by: Neil | last post by:
I'm running Access 2000 with a SQL 7 back end, using ODBC linked tables in an MDB file. The db is used by about 30 users on a LAN, and an additional 10 or so on a WAN. Recently, one of the WAN...
6
by: scott.tang | last post by:
I'm experiencing a very strange problem. My application is MS Access front-end and MS SQL server back-end database. I have a SQL statement that deletes records from a table after an export...
3
by: Bret Kuhns | last post by:
I recently started a co-op/internship at a company and they are looking to migrate a large legacy supported application from OLEDB to SQL Server. I'm doing prelim work in experimenting with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.