Re: need help with errors in ODBC log

From: "Apostolos B(dot) STERGIOPOULOS" <abstergio(at)hotmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: need help with errors in ODBC log
Date: 2001-03-27 16:38:38
Message-ID: F181V0mMhBwY486qCsm0000cc4a@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces




Re: need help with errors in ODBC log



From: Carolyn Lu Wong carolyn(at)greatpacific(dot)com(dot)au


To: Dave Page dpage(at)vale-housing(dot)co(dot)uk


Subject: Re: need help with errors in ODBC log

Date: Wed, 08 Nov 2000 09:22:19 +1100



Dave Page wrote:

-----Original Message-----
From: Carolyn Lu Wong [mailto:carolyn(at)greatpacific(dot)com(dot)au]
Sent: 07 November 2000 04:03
To: pgsql-interfaces(at)postgresql(dot)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.


The following two lines represent a code fragment that can be used withthe VB development; we can place these lines within our 'Main' routine(s) and 'massage' their values to iron-out many access problems, not excluding the infamous 'Database Cancellation' run-time error 3669:

glLoginTimeout = Val(GetINIString("LoginTimeout", "20"))

glQueryTimeout = Val(GetINIString("QueryTimeout", "60"))

BTW, the values presented above, are the default values for these properties. I attach a couple of extracts from the VB on-line help, to shed more light into this issue.

Enjoy,

-Toli :-)

____________________________________________________________

I Only Know One Thing -- That I Know Nothing! (SOCRATES)

____________________________________________________________

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Attachment Content-Type Size
unknown_filename text/html 4.4 KB
TimeOutProperites.txt text/plain 2.7 KB

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jamz 2001-03-28 01:19:36 Installation Problem
Previous Message Stephane Pinel 2001-03-27 10:41:40 Libpq for the MacOS (2)