From: | "Andrea Aime" <aaime(at)comune(dot)modena(dot)it> |
---|---|
To: | Postgres ODBC <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Driver errors with Autocad (please help) |
Date: | 2001-04-19 08:59:29 |
Message-ID: | 3ADEA8F1.D1F5697D@comune.modena.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi everybody,
I've run in a number of problem trying to use Autocad Map 2000i with
postgres ODBC driver. Autocad claims to use OLEDB/ODBC driver to access
data, but in fact I use it with my visual basic programs and I get no
errors, everything is working fine. When I connect to PostgreSQL data
source Autocad says that it's a read-only data source (this is not true,
I can modify data from VB). I can stand this, I don't need to modify
data.
Anyway, when I try to perform some operations (creation of a thematic
map based on data contained in PostgreSQL tables) I get a "cursor
operation
conflict" error. Notice that if I use OLEDB/ODBC driver over an Access
DSN
everything goes fine (and I see the source as read/write). Also, I've
found
that if I link pgsql tables to and access db and the I use Access OLEDB
provider everything runs fine (but I cannot use that solution since
in my db table get created and dropped during system's life, this is not
a static db)
I've tryied to give a look at logs and there are some errors.
In sql.log I've found the following errors, that are issued when I
connect
to PostgreSQL tables from Autocad (if you like I can send you the full
log file):
acad f0-50 ENTER SQLGetInfoW
HDBC 04DF3DF8
UWORD 151 <SQL_KEYSET_CURSOR_ATTRIBUTES2>
PTR 0582AC68
SWORD 4
SWORD * 0x00000000
acad f0-50 EXIT SQLGetInfoW with return code -1 (SQL_ERROR)
HDBC 04DF3DF8
UWORD 151 <SQL_KEYSET_CURSOR_ATTRIBUTES2>
PTR 0582AC68
SWORD 4
SWORD * 0x00000000
acad f0-50 ENTER SQLGetInfoW
HDBC 04DF3DF8
UWORD 168 <SQL_STATIC_CURSOR_ATTRIBUTES2>
PTR 0582AC68
SWORD 4
SWORD * 0x00000000
acad f0-50 EXIT SQLGetInfoW with return code -1 (SQL_ERROR)
HDBC 04DF3DF8
UWORD 168 <SQL_STATIC_CURSOR_ATTRIBUTES2>
PTR 0582AC68
SWORD 4
SWORD * 0x00000000
In psqlodbc logs I also found the following error, that is issued when I
try
to execute thematic map creation:
conn=102033048, query='SELECT CLASSE FROM tav974 WHERE SIAPK974='
ERROR from backend during send_query: 'ERROR: parser: parse error at or
near ""'
STATEMENT ERROR: func=SC_execute, desc='', errnum=-1, errmsg='Error
while executing the query (non-fatal)'
------------------------------------------------------------
hdbc=102033048, stmt=103096400, result=102040592
manual_result=0, prepare=1, internal=0
bindings=0, bindings_allocated=0
parameters=0, parameters_allocated=0
statement_type=0, statement='SELECT CLASSE FROM tav974
WHERE SIAPK974=?'
stmt_with_params='SELECT CLASSE FROM tav974 WHERE
SIAPK974='
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_CUR06252050'
----------------QResult Info
-------------------------------
fields=102040976, manual_tuples=0, backend_tuples=0,
tupleField=0, conn=0
fetch_count=0, fcount=0, num_fields=0, cursor='(NULL)'
message='(NULL)', command='(NULL)', notice='(NULL)'
status=6, inTuples=0
CONN ERROR: func=SC_execute, desc='', errnum=110, errmsg='ERROR:
parser: parse error at or near ""'
------------------------------------------------------------
henv=102041232, conn=102033048, status=1, num_stmts=16
sock=102047696, stmts=102047616, lobj_type=-999
---------------- Socket Info -------------------------------
socket=272, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in=103088192, buffer_out=103092296
buffer_filled_in=44, buffer_filled_out=0, buffer_read_in=44
It seems that Autocad is trying to create a prepared statement with a
parameter
(statement='SELECT CLASSE FROM tav974 WHERE SIAPK974=?' where ? is the
parameter) I also can
see from sql.log:
acad f0-50 ENTER SQLPrepareW
HSTMT 04DF2050
WCHAR * 0x0384F138 [ 42] "SELECT CLASSE FROM tav974
WHERE SIAPK974=?"
SDWORD 42
acad f0-50 EXIT SQLPrepareW with return code 0
(SQL_SUCCESS)
HSTMT 04DF2050
WCHAR * 0x0384F138 [ 42] "SELECT CLASSE FROM tav974
WHERE SIAPK974=?"
SDWORD 42
acad f0-50 ENTER SQLNumResultCols
HSTMT 04DF2050
SWORD * 0x0582E8D0
acad f0-50 EXIT SQLNumResultCols with return code 0
(SQL_SUCCESS)
HSTMT 04DF2050
SWORD * 0x0582E8D0 (0)
acad f0-50 ENTER SQLFreeStmt
HSTMT 04DF2050
UWORD 1 <SQL_DROP>
acad f0-50 EXIT SQLFreeStmt with return code 0
(SQL_SUCCESS)
HSTMT 04DF2050
UWORD 1 <SQL_DROP>
(* SQL.LOG ENDS HERE *)
So, how it is, here it seems that the prepared statement gets processed
the right way... but then it
gets called without parameters?
Anyone can give me some advice? I can program in C and I have Visual
C++, althought I don't have
any experience with ODBC protocol, so even an advice on how to correct
ODBC driver from source
code would be appreciated.
Regards
Aime Andrea
From | Date | Subject | |
---|---|---|---|
Next Message | Andrea Aime | 2001-04-19 09:53:02 | Re: Driver errors with Autocad (please help) |
Previous Message | Keith Todd | 2001-04-19 04:36:59 | include files |