|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
I have (I believe) installed correctly the ODBC driver for Content Server. I appear to be able to open a connection to the ODBC driver. What I can't do yet is get the database to respond to a query.
I am using ASP, and here is some example code: dim sql
sql = "select * from ID"
dim result
set result = Server.CreateObject("ADODB.Recordset")
result.Open sql, odbcConn,0,1,2
do while not result.EOF
response.write result
result.MoveNext
loop
result.Close
odbcConn.close
I'm pretty sure from reading the INI file that I have a column called "ID". I have tried a range of queries, but they all result in the following error: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Inmagic, Inc.][CS ODBC Driver]Expected lexical element not found: <identifier> This occurs on the line with result.Open Can anyone shed any light on what I'm doing wrong? Thanks. |
|||
|
In SELECT * from ID, ID is the table name (the textbase name), not the column name (the field name). If you want to get all the IDs in the CATALOG textbase, you would do:
SELECT ID FROM CATALOG If you want to get the contents of all the fields in all the records in the CATALOG textbase, you would do: SELECT * FROM CATALOG Another typical search would be: SELECT ID, TITLE FROM CATALOG WHERE TITLE = 'Massachusetts*' |
||||
|
Thank you for your quick response. I had already tried other queries in the formats you suggested, and they are good suggestions. I've tried everything I can think of, and I keep getting the same error:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Inmagic, Inc.][CS ODBC Driver]Expected lexical element not found: <identifier> What I am now wondering is how I can do information gathering via ODBC link. I tried using a general query - "show databases" (also show tables, show columns in, etc.) in hopes of getting something to start from, but so far this type of query gives me errors too. It is a different error though, which is something: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Inmagic, Inc.][CS ODBC Driver][Content Server]Unable to open table I'm just not sure what to try next. |
||||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

