473,662 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SqlServer 7.0 ODBC error when querying with order by

Hi, we have SQL Server 7.00.961 running on Windows 2000. On the client
side we use ODBC driver 3.70.09.61 and an OCX component to retrieve rows
from a table having about 600 000 rows.

All works fine if we just retrieve rows without ordering them. If we put
order by clause to the query, we get the following error message:

-2147467259 unspecified error. This error comes almost immediately after
submitting the query.

If we modify the select clause so that we retrieve only 30 rows, we can use
order by without problem :

Select column1,... from table --
this works
Select column1,... from table order by column -- this doesn't
work
Select top 30 column1,... from table order by -- this works

If we use SQL Server Query analyzer all works fine. So this problem comes
probably from odbc driver ?
I wonder if somebody has faced this same problem ?
Regards, Tomi Laamanen



Jul 20 '05 #1
0 1799

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

Similar topics

2
3276
by: Steve | last post by:
I normally use MySQL with PHP, but I'm delving into connecting to Access with ODBC (for a database that I already have set up at work), and I'm running into a couple of errors. I'm just trying to do a simple query with two columns - one a name (VARCHAR), and one an integer column. First, if I add an ORDER BY clause, so the query looks like this: $sql = "select tblScores.FullName, sum(tblScores.Points) as TotalPoints from tblScores...
2
3623
by: Peter Morris | last post by:
Hi, I'm having trouble connecting to SQLServer in my ASP program. here's the code <% dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, objParameters Set objConnection = Server.CreateObject ("ADODB.Connection") strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;" objConnection.Open strConnection ....
2
2969
by: Martijn Rutte | last post by:
Hi, On one side, I have a Sybase 12.5 32 bits Server running on AIX 5.1 (maintenance level 3). On the other, I've got W2000 5.00.2195 (SP2) with SQL Server Standard Edition, Product Version 8.00.534 (SP2), having installed MDAC 2.6. I connect to the Sybase 12.5 database using Merant ASE ODBC driver for Sybase 12.5, and using the Microsoft OLE DB Provider for SQL Server that comes with this SQLServer version.
2
2438
by: tango | last post by:
In Excel VBA, I've established an ODBC connection to a SQLServer db, and I can do a successful SELECT query, but I'm having trouble doing an UPDATE query. When I run the following code, I get the error, "Cannot Execute a Select query." Dim dbsCurrent As Database Dim qdfChange As QueryDef Dim rs1 As Recordset
4
3566
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into Excel. I am trying to translate the same program over to Microsoft Access and I ran into a problem. Access locks up if the data I am querying for is not present in the database. To retrieve data from the database of the application, my Excel...
2
2352
by: Jim Devenish | last post by:
I am in the early stages of converting a back-end .mdb file to SqlServer - my first attempt! I have used Data Transformation Services to copy all the tables to SqlServer into a database named JobSystem. When using Enterprise Manager, I can see all the data. So far, so good!! >From within the front-end I want to link my tables and have tried the following code: For Each tdf In CurrentDb.TableDefs
0
1566
by: UDBDBA | last post by:
Hi: We have a setup which connects a V8.2 32bit db2 instance on AIX to SQLServer 2000 using the unixODBC driver. We have 5 SQLServer "Server mappings" and 4 of them work just fine and can use the nicknames associated with it. The one last mapping is going against a sqlserver and can't seem to get the nicknames setup on db2. The error is:
3
3315
by: TheMaxx | last post by:
I've created ODBC DSN for sql server. When i connect from win application works OK. When i make WebService (on same machine) that connects to that ODBC connection fails: Error: Server was unable to process request. --ERROR Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. ERROR Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server
0
1271
by: TheMaxx | last post by:
I need to access ODBC from remote computer, if there's a better way other than WebService please let me know. So, i am doing web service which connects on ODBC, which connects to SqlServer 2000 (Windows auth.) First error was: Login failed for user 'MyComputerNmae\ASPNET'. Then i unchecked "Anonymous acces" from IIS for this webservice
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.