Обсуждение: ODBC experts needed!

Поиск
Список
Период
Сортировка

ODBC experts needed!

От
"Andrea Aime"
Дата:
I'm using Postgres as DBMS to store some data tables attached to 
Autocad Map drawings (maps). I've got some problems: if I try
to look at the attached table I got a strange error, here is
the odbc-driver log:

conn=101857584, query='SELECT * FROM attributo'   [ fetched 13 rows ]
conn=101857584, query='SELECT COUNT (*) FROM attributo'   [ fetched 1 rows ]
conn=101857584, query='SELECT INVALID SELECT STATEMENT TO FORCE ODBC
DRIVER TO UNPREPARED STATE'
ERROR from backend during send_query: 'ERROR:  parser: parse error at or
near "select"'
STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='Error while
executing the query'               
------------------------------------------------------------                hdbc=101857584, stmt=102041176, result=0
           manual_result=0, prepare=0, internal=0                bindings=101974496, bindings_allocated=1
parameters=0, parameters_allocated=0                statement_type=0, statement='SELECT INVALID SELECT
 
STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE'                stmt_with_params='SELECT INVALID SELECT STATEMENT
TO
FORCE ODBC DRIVER TO UNPREPARED STATE'                data_at_exec=-1, current_exec_param=-1, put_data=0
currTuple=-1,current_col=-1, lobj_fd=-1                maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0,
 
scroll_concurrency=1                cursor_name='SQL_CUR06150658'                ----------------QResult Info
-------------------------------
CONN ERROR: func=SC_execute, desc='', errnum=110, errmsg='ERROR: 
parser: parse error at or near "select"'           ------------------------------------------------------------
 henv=101850696, conn=101857584, status=1, num_stmts=16           sock=101850712, stmts=101850760, lobj_type=-999
   ---------------- Socket Info -------------------------------           socket=248, reverse=0, errornumber=0,
errormsg='(NULL)'          buffer_in=101863920, buffer_out=101868024           buffer_filled_in=50,
buffer_filled_out=0,buffer_read_in=50
 

Of course "SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO
UNPREPARED STATE"
is not a SQL command, but I don't undestand who is issuing that nor is
meaning. 
If I understand correctly, Autocad uses ADO to access databases. Any
hints?
Bye and thanks in advance
Andrea


Re: ODBC experts needed!

От
Thomas Lockhart
Дата:
> Of course "SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO
> UNPREPARED STATE" is not a SQL command, but I don't undestand who
> is issuing that nor is meaning.
> If I understand correctly, Autocad uses ADO to access databases. Any
> hints?

Autocad or ADO is issuing this, apparently as a pitiful attempt to reset
the ODBC connection. Have you managed to get this to work with some
other database product? If the intent of the program was to send an
invalid command (which to their credit is well documented in the invalid
command itself), it seems to have succeeded, so what exactly is the
problem?
                       - Thomas

(Sorry for the duplicate messages Andrea, I've got a new address at home
and I'm trying to get my mailing address to line up with my previous
subscription address since majordomo is rejecting my replies.)


RE: ODBC experts needed!

От
Dave Page
Дата:

> -----Original Message-----
> From: Thomas Lockhart [mailto:lockhart@alumni.caltech.edu]
> Sent: 05 January 2001 14:57
> To: andrea.aime@comune.modena.it
> Cc: pgsql-interfaces
> Subject: Re: [INTERFACES] ODBC experts needed!
> 
> 
> > Of course "SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO
> > UNPREPARED STATE" is not a SQL command, but I don't undestand who
> > is issuing that nor is meaning.
> > If I understand correctly, Autocad uses ADO to access databases. Any
> > hints?
> 
> Autocad or ADO is issuing this, apparently as a pitiful 
> attempt to reset
> the ODBC connection. 

I would guess that it's AutoCAD as I've never seen ADO do anything even
remotely like that in all the code I've written using it. Having said that,
if AutoCAD is using ADO, why would it care what state the ODBC driver was
in?

Regards,

Dave.


Re: ODBC experts needed!

От
Thomas Lockhart
Дата:
> Of course "SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO
> UNPREPARED STATE" is not a SQL command, but I don't undestand who
> is issuing that nor is meaning.
> If I understand correctly, Autocad uses ADO to access databases. Any
> hints?

Autocad or ADO is issuing this, apparently as a pitiful attempt to reset
the ODBC connection. Have you managed to get this to work with some
other database product? If the intent of the program was to send an
invalid command (which to their credit is well documented in the invalid
command itself), it seems to have succeeded, so what exactly is the
problem?
                       - Thomas