Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Shunting ODBC Connect Dialog Box after failed Connect

2 posts in General Discussion Last posting was on 2006-10-24 16:16:32.0Z
Mike Allen Posted on 2006-10-24 15:20:41.0Z
Sender: 5a21.453e27f3.1804289383@sybase.com
From: Mike Allen
Newsgroups: ianywhere.public.general
Subject: Shunting ODBC Connect Dialog Box after failed Connect
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <453e2f49.5abf.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Oct 2006 08:20:41 -0700
X-Trace: forums-1-dub 1161703241 10.22.241.41 (24 Oct 2006 08:20:41 -0700)
X-Original-Trace: 24 Oct 2006 08:20:41 -0700, 10.22.241.41
Lines: 14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5686
Article PK: 1699

I am running Adaptive Server Anywhere Ver 9.0.1
I have an application that runs in the "backroom" and
connects to the database every so often to do work. Once or
twice a week, the application will fail to connect to the
database (I am assuming some random Comm error). When this
happens, an ODBC Connect Dialog Box pops up prompting me for
connection parameters (userid, pass, network, etc). Since
this is a lights out application, there is no one to press
the OK button.

I would like to have the driver just return an error to the
application without popping the dialog box. Then my app can
handle the error recovery itself. Is there an option or
switch to accomplish this?


Nick Elson Posted on 2006-10-24 16:16:32.0Z
From: "Nick Elson" <no_span_nicelson@sybase.com>
Newsgroups: ianywhere.public.general
References: <453e2f49.5abf.1681692777@sybase.com>
Subject: Re: Shunting ODBC Connect Dialog Box after failed Connect
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: nicelson-m20.sybase.com
X-Original-NNTP-Posting-Host: nicelson-m20.sybase.com
Message-ID: <453e3c60$1@forums-1-dub>
Date: 24 Oct 2006 09:16:32 -0700
X-Trace: forums-1-dub 1161706592 10.25.98.215 (24 Oct 2006 09:16:32 -0700)
X-Original-Trace: 24 Oct 2006 09:16:32 -0700, nicelson-m20.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5687
Article PK: 1698

If you are using the ODBC API you need to program
this into your application.

SQLDriverConnect( )

has the parameter that controls this, called "DriverCompletion"
which is normally set to SQL_DRIVER_COMPLETE or
SQL_DRIVER_COMPLETE_REQUIRED in most
IDEs. You need to force that to be SQL_DRIVER_NOPROMPT
in either your code (if calling ODBC directly) or your IDE.
I know PB can do this for you ... other IDEs may/may not
have that amount of control over this feature.

<Mike Allen> wrote in message news:453e2f49.5abf.1681692777@sybase.com...
>I am running Adaptive Server Anywhere Ver 9.0.1
> I have an application that runs in the "backroom" and
> connects to the database every so often to do work. Once or
> twice a week, the application will fail to connect to the
> database (I am assuming some random Comm error). When this
> happens, an ODBC Connect Dialog Box pops up prompting me for
> connection parameters (userid, pass, network, etc). Since
> this is a lights out application, there is no one to press
> the OK button.
>
> I would like to have the driver just return an error to the
> application without popping the dialog box. Then my app can
> handle the error recovery itself. Is there an option or
> switch to accomplish this?