Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server, ADO and Order By Problems

Status
Not open for further replies.

tfierens

Programmer
Feb 28, 2001
11
IE
Hi all,

Have any of you out there had the same problem as I have. If so please forward me the solution to this!

This is the first time I have encountered and I just cannot figure it out!

This occuring on SQL Server 7.0 (SP3)

I have the following query (which by the way is correct and runs fine, in MS Access and SQL Server itself):

Select * from t1 order by OptionID, ParentID, ChildID, Description

I keep on getting an OLE Error number and a description which tells me that OptionID, ParentID, ChildID are invalid column name. The 3 columns are of type int.

As mentioned above, it has always worked in all my clients site, but I recently installed at home, it I have it this problem. Yet, order by works for other queries, and all the rest of my queries work correctly except for that one.

I have tried adding indexes, removing them, changing the type, and many other things, but I give up???!!?!?

Any help would be greatly appriciated.

Regards,

Thierry
 
Your query runs fine on a test table in my SQL 7/SP3 database.
Maybe your server is case-SENSITIVE?
br
Gerard
(-:
 
Hi Gerard,

Thanks a lot for this!! I am so annoyed I did not think of that! It has happened to us before, but I just did not come to mind!

I have spend a ridiculuous amount of time looking into this problem, and bang!! It was as simple as this!

Any suggestion on how I can turn this option off would be great!! In the mean time I will just rename the fields just as they are in the code, but it would be handy to know how to do this!

Once again!!! Many thanks for that!

Regards,

Thierry
 
Thierry,
You can not change that server option.
Search MS database on this topic, there is
an article about this topic.
br
Gerard
(-:
 
Thanks again for your help Gerard!

Very much appreciated!

Regards,

Thierry
 
Hi Gerard.Thierry
Could you please post the URL for that article ?

Desperate here..
Thank you...
RR

 
RR,

Sorry, but I don't have an article. I just could not believe I had forgotten that SQL Server could be and in my case was set to case sensitive for fields, and tables.

Anyway, you may want to try on msdn something like : SQL Server Case Sensitive. This may bring you back an article with more details on it!

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top