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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with odbc-SQL server connection

Status
Not open for further replies.

Porshe

Programmer
Jun 5, 2001
38
0
0
US
Hi,

I set up a connection for an SQL server on win2000 using ODBC. I keep getting an error message that says "Unrecognized column name encountered: UNKNOWN"

-its connected to a local server
-uses SQL Server authentication- login ID and password
--uses ANSI quoted identifiers
-use ANSI nulles,passingd and warnings


any help please?
 
Are you getting this error in the ODBC Manager when testing the connection? Or when running a query from some client application (Query Analyzer, MS Access, etc)? -----------------
Robert Bradley
use coupon code "TEKTIPS" for 15% off at:
 
We get the error when we run a query from another application you probably never heard of- Gensym.

the test connection is okay.
 
it seems that when we do a SELECT Count-
it doesn't seem to like the count keyword>
any ideas?
 
i get an error of sr=42000
unrecognized column name- what exactly is the syntax for doing a SELECT count on some column from datatable. maybe i'm putting spaces or something?
please- any ideas?
 

Select count(colname) As Cnt
From TableName

Or

Select count(*) As Cnt
From TableName Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
As Terry noted, the syntax is pretty straightforward.

But, if the server is set to case-sensitive, then the column name would be case sensitive, and must match exactly to what the column's true name is. -----------------
Robert Bradley
use coupon code "TEKTIPS" for 15% off at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top