pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedneed help with errors in ODBC log
4+ messages / 3 participants
[nested] [flat]
* need help with errors in ODBC log
@ 2000-11-07 04:03 Carolyn Lu Wong <carolyn@greatpacific.com.au>
0 siblings, 0 replies; 4+ messages in thread
From: Carolyn Lu Wong @ 2000-11-07 04:03 UTC (permalink / raw)
To: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: need help with errors in ODBC log
@ 2000-11-07 08:17 Dave Page <dpage@vale-housing.co.uk>
2000-11-07 22:22 ` Re: need help with errors in ODBC log Carolyn Lu Wong <carolyn@greatpacific.com.au>
0 siblings, 1 reply; 4+ messages in thread
From: Dave Page @ 2000-11-07 08:17 UTC (permalink / raw)
To: 'Carolyn Lu Wong' <carolyn@greatpacific.com.au>; pgsql-interfaces
> -----Original Message-----
> From: Carolyn Lu Wong [mailto:carolyn@greatpacific.com.au]
> Sent: 07 November 2000 04:03
> To: pgsql-interfaces@postgresql.org
> Subject: [INTERFACES] need help with errors in ODBC log
>
>
> 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 additional 'SELECT * FROM' is probably caused by having the command type
set to table rather than text in the data control. This causes the control
to assume that the recordsource is a tablename so it sticks SELECT * FROM in
front of it to create a complete query.
HTH,
Regards, Dave.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: need help with errors in ODBC log
2000-11-07 08:17 RE: need help with errors in ODBC log Dave Page <dpage@vale-housing.co.uk>
@ 2000-11-07 22:22 ` Carolyn Lu Wong <carolyn@greatpacific.com.au>
0 siblings, 0 replies; 4+ messages in thread
From: Carolyn Lu Wong @ 2000-11-07 22:22 UTC (permalink / raw)
To: Dave Page <dpage@vale-housing.co.uk>; +Cc: pgsql-interfaces
Dave Page wrote:
>
> > -----Original Message-----
> > From: Carolyn Lu Wong [mailto:carolyn@greatpacific.com.au]
> > Sent: 07 November 2000 04:03
> > To: pgsql-interfaces@postgresql.org
> > Subject: [INTERFACES] need help with errors in ODBC log
> >
> >
> > 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 additional 'SELECT * FROM' is probably caused by having the command type
> set to table rather than text in the data control. This causes the control
> to assume that the recordsource is a tablename so it sticks SELECT * FROM in
> front of it to create a complete query.
>
> HTH,
> Regards, Dave.
The thing is, when I run the same application accessing database from
the local server (LAN), I don't have the VB 3669 error, and the
additional 'Select * from' does not exist in the log file. However, if
i'm accessing database from remote server (WAN), it causes the VB
error and there's additional 'select * from' in the log file! Apart
from the differences in the data, both database table definitions are
identical.
FYI, the source of the recordset in VB is SQL statement.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: need help with errors in ODBC log
@ 2001-03-27 16:38 Apostolos B. STERGIOPOULOS <abstergio@hotmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Apostolos B. STERGIOPOULOS @ 2001-03-27 16:38 UTC (permalink / raw)
To: pgsql-interfaces
=======================
LoginTimeout Property
=======================
Sets or returns the number of seconds before an error occurs when you
attempt to log on to an ODBC database.
Settings and Return Values
~~~~~~~~~~~~~~~~~~~~~~~~~~
The setting or return value is an Integer representing the number of seconds
before a login timeout error occurs.
The default LoginTimeout property setting is 20 seconds. When the
LoginTimeout property is set to 0, no timeout occurs.
Remarks
~~~~~~~
When you're attempting to log on to an ODBC database, such as Microsoft SQL
Server, the connection can fail as a result
of network errors or because the server isn't running. Rather than waiting
for the default 20 seconds to connect, you can
specify how long to wait before raising an error. Logging on to the server
happens implicitly as part of a number of
different events, such as running a query on an external server database.
You can use LoginTimeout on the DBEngine object in both Microsoft Jet and
ODBCDirect workspaces. You can use LoginTimeout
on the Workspace object only in ODBCDirect workspaces. Setting the property
to -1 on a Workspace will default to the current
setting of DBEngine.LoginTimeout. You can change this property in a
Workspace at any time, and the new setting will take
effect with the next Connection or Database object opened.
The default value is determined by the ODBC driver. In a Microsoft Jet
workspace, you can override the drivers default
value by creating a new ODBC key in the Registry path
\HKEY_LOCAL_MACHINE\SOFTWARE\Jet\3.5\, creating a LoginTimeout
parameter in this key, and setting the value as desired.
=======================
QueryTimeout Property
=======================
Sets or returns a value that specifies the number of seconds to wait before
a timeout error occurs when a query is executed
on an ODBC data source.
Settings and Return Values
~~~~~~~~~~~~~~~~~~~~~~~~~~
The setting or return value is an Integer representing the number of seconds
to wait. The default value is 60.
Remarks
~~~~~~~
When you're using an ODBC database, such as Microsoft SQL Server, there may
be delays due to network traffic or heavy use of
the ODBC server. Rather than waiting indefinitely, you can specify how long
to wait.
When you use QueryTimeout with a Connection or Database object, it specifies
a global value for all queries associated with
the database. You can override this value for a specific query by setting
the ODBCTimeout property of the particular QueryDef
object.
In a Microsoft Jet workspace, you can override the default value by creating
a new ODBC key in the Registry path
\HKEY_LOCAL_MACHINE\SOFTWARE\Jet\3.5\, creating a QueryTimeout parameter in
this key, and setting the value as desired.
Attachments:
TimeOutProperites.txt (text/plain, 2.7K) download
=======================
LoginTimeout Property
=======================
Sets or returns the number of seconds before an error occurs when you
attempt to log on to an ODBC database.
Settings and Return Values
~~~~~~~~~~~~~~~~~~~~~~~~~~
The setting or return value is an Integer representing the number of seconds
before a login timeout error occurs.
The default LoginTimeout property setting is 20 seconds. When the
LoginTimeout property is set to 0, no timeout occurs.
Remarks
~~~~~~~
When you're attempting to log on to an ODBC database, such as Microsoft SQL
Server, the connection can fail as a result
of network errors or because the server isn't running. Rather than waiting
for the default 20 seconds to connect, you can
specify how long to wait before raising an error. Logging on to the server
happens implicitly as part of a number of
different events, such as running a query on an external server database.
You can use LoginTimeout on the DBEngine object in both Microsoft Jet and
ODBCDirect workspaces. You can use LoginTimeout
on the Workspace object only in ODBCDirect workspaces. Setting the property
to -1 on a Workspace will default to the current
setting of DBEngine.LoginTimeout. You can change this property in a
Workspace at any time, and the new setting will take
effect with the next Connection or Database object opened.
The default value is determined by the ODBC driver. In a Microsoft Jet
workspace, you can override the drivers default
value by creating a new ODBC key in the Registry path
\HKEY_LOCAL_MACHINE\SOFTWARE\Jet\3.5\, creating a LoginTimeout
parameter in this key, and setting the value as desired.
=======================
QueryTimeout Property
=======================
Sets or returns a value that specifies the number of seconds to wait before
a timeout error occurs when a query is executed
on an ODBC data source.
Settings and Return Values
~~~~~~~~~~~~~~~~~~~~~~~~~~
The setting or return value is an Integer representing the number of seconds
to wait. The default value is 60.
Remarks
~~~~~~~
When you're using an ODBC database, such as Microsoft SQL Server, there may
be delays due to network traffic or heavy use of
the ODBC server. Rather than waiting indefinitely, you can specify how long
to wait.
When you use QueryTimeout with a Connection or Database object, it specifies
a global value for all queries associated with
the database. You can override this value for a specific query by setting
the ODBCTimeout property of the particular QueryDef
object.
In a Microsoft Jet workspace, you can override the default value by creating
a new ODBC key in the Registry path
\HKEY_LOCAL_MACHINE\SOFTWARE\Jet\3.5\, creating a QueryTimeout parameter in
this key, and setting the value as desired.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-03-27 16:38 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-07 04:03 need help with errors in ODBC log Carolyn Lu Wong <carolyn@greatpacific.com.au>
2000-11-07 08:17 RE: need help with errors in ODBC log Dave Page <dpage@vale-housing.co.uk>
2000-11-07 22:22 ` Carolyn Lu Wong <carolyn@greatpacific.com.au>
2001-03-27 16:38 Re: need help with errors in ODBC log Apostolos B. STERGIOPOULOS <abstergio@hotmail.com>
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