Skip site navigation (1) Skip section navigation (2)

Prepare statement failure

From: Graeme Leeming <gleeming(at)refractions(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Prepare statement failure
Date: 2001-05-28 21:45:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc

ODBC seems to be having a problem with the following prepared statement:
"SELECT t3.* FROM JURISDICTION2  t3 WHERE jurisdiction_name = ?"

I am trying to use a software tool called Feature Manipulation Engine
(FME) made by Safe Software to perform ODBC queries and table relates on
a Postgres database.  So far I have been partially successful in using
FME to send and retrieve data to my Postgres V7.1.1 database using the ODBC driver.  One type of query fails every time I run it;
FME appears to form the query as a prepared SELECT statement/SQL
cursor.  I would like to know if the ODBC driver is the problem (and if
it can be fixed) or if FME is just not communicating properly with the
driver.  Snippets from the comm log are as follows:






conn=20424392, query='SELECT t3.* FROM JURISDICTION2  t3 WHERE
jurisdiction_name = ?'
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=20424392, stmt=21495872, result=20455344
                 manual_result=0, prepare=1, internal=0
                 bindings=0, bindings_allocated=0
                 parameters=20450544, parameters_allocated=1
                 statement_type=0, statement='SELECT t3.* FROM
JURISDICTION2  t3 WHERE jurisdiction_name = ?'
                 stmt_with_params='SELECT t3.* FROM JURISDICTION2  t3
WHERE jurisdiction_name = ?'
                 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,
                 ----------------QResult Info
                 fields=20455312, 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=20450944, conn=20424392, status=1, num_stmts=16
            sock=20450768, stmts=20450688, lobj_type=-999
            ---------------- Socket Info -------------------------------

            socket=412, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=20430864, buffer_out=20434968
            buffer_filled_in=44, buffer_filled_out=0, buffer_read_in=44
conn=20424392, SQLDisconnect
conn=20409712, SQLDisconnect

     Graeme Leeming


pgsql-odbc by date

Next:From: radiusDate: 2001-05-29 03:00:00
Subject: Re: access question
Previous:From: Ken J. WrightDate: 2001-05-28 12:08:57
Subject: Re: Kylix inerface

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group