From: Carolyn Lu Wong <carolyn@greatpacific.com.au>
To: pgsql-interfaces@postgresql.org <pgsql-interfaces@postgresql.org>
Subject: need help with errors in ODBC log
Date: Tue, 07 Nov 2000 15:03:11 +1100
Message-ID: <3A077EFF.EC695F45@greatpacific.com.au> (raw)
This problem is regarding VB5 application connection to postgreSQL
V6.5 via PsqlODBC V6.5. I'm not sure if the problem is related to ODBC
or the database. Please let me know if I should direct the question to
another discussion group.
When I try to open a record set from VB with a simple select
statement, results are retrieved if I connect to database on a local
server. However, if I try to retrieve data from remote server (via
internet) with the same code, I get the following error: '3669:
Execution Cancelled' (source - DAO.Connection).
The statement I try to open the record set with is 'select * from
accounts where account_no = 3;' I have included extractions from the
ODBC log files for both cases. The only difference I can see is in the
case where error arises, it has additional 'select * from select *
from....' in the log. I don't know where the 'select *' that comes
before the select statement comes from.
The following is extracted from the log from ODBC driver where data is
retrieved successfully:
conn=37254888, query='select * from accounts where account_no = 3 ;
'
[ fetched 1 rows ]
conn=37254888, query='SELECT * FROM accounts'
[ fetched 1182 rows ]
conn=37254888, query='select ta.attname, ia.attnum from pg_attribute
ta, pg_attribute ia, pg_class c, pg_index i where c.relname =
'accounts_pkey' AND c.oid = i.indexrelid AND ia.attrelid =
i.indexrelid AND ta.attrelid = i.indrelid AND ta.attnum =
i.indkey[ia.attnum-1] order by ia.attnum'
[ fetched 1 rows ]
conn=37254888, query='select c.relhasrules from pg_user u, pg_class c
where u.usesysid = c.relowner and c.relname like 'accounts''
[ fetched 1 rows ]
conn=37254888, query='select * from hist_ac_payment where account_no
= 3 order by id desc; '
[ fetched 0 rows ]
And the following is extracted from the log from ODBC driver where I
get the error:
conn=41514824, query='select * from accounts where account_no = 3 ;
'
[ fetched 1 rows ]
conn=41514824, query='SELECT * FROM accounts'
[ fetched 1342 rows ]
conn=41514824, query='select ta.attname, ia.attnum from pg_attribute
ta, pg_attribute ia, pg_class c, pg_index i where c.relname =
'accounts_pkey' AND c.oid = i.indexrelid AND ia.attrelid =
i.indexrelid AND ta.attrelid = i.indrelid AND ta.attnum =
i.indkey[ia.attnum-1] order by ia.attnum'
[ fetched 1 rows ]
conn=41514824, query='select c.relhasrules from pg_user u, pg_class c
where u.usesysid = c.relowner and c.relname like 'accounts''
[ fetched 1 rows ]
conn=41514824, query='SELECT * FROM select * from accounts where
account_no = 3 ; '
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=41514824, stmt=41617568, result=0
manual_result=0, prepare=0, internal=0
bindings=0, bindings_allocated=0
parameters=0, parameters_allocated=0
statement_type=0, statement='SELECT * FROM select *
from accounts where account_no = 3 ; '
stmt_with_params='SELECT * FROM select * from
accounts where account_no = 3 ; '
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_CUR027B08A0'
----------------QResult Info
-------------------------------
CONN ERROR: func=SC_execute, desc='', errnum=110, errmsg='ERROR:
parser: parse error at or near "select"'
------------------------------------------------------------
henv=41492040, conn=41514824, status=1, num_stmts=16
sock=41514016, stmts=41513288, lobj_type=-999
---------------- Socket Info
-------------------------------
socket=520, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in=41525160, buffer_out=41529264
buffer_filled_in=50, buffer_filled_out=0,
buffer_read_in=50
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: carolyn@greatpacific.com.au
Subject: Re: need help with errors in ODBC log
In-Reply-To: <3A077EFF.EC695F45@greatpacific.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox