Skip to Content.
Sympa Menu

freetds - [freetds] dblib question - handling bad login name/password from a user

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Andy Cranston <a.cranston AT selwaymoore.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] dblib question - handling bad login name/password from a user
  • Date: Mon, 26 Apr 2004 16:59:17 +0100

Hello list,

I'm getting more comfortable using the dblib package to write C programs on
my Solaris machine (Solaris 8) to talk to MS Sql Server databases.

So far I have been using the syb_msg_handler and syb_err_handler code from
the following source distribution file:

freetds-0.62.1/src/dblib/unittests/common.c

However I'd like to write my own handlers. The main reason being to catch
an invalid login attempt via:

dbproc = dbopen(login, DEFAULT_SERVER);

Instead of the program bombing out I'd like to be able to gracefully
reprompt for another username and password.

Am I right in thinking I need to amend the handler routines to do this? If
so any suggestions on a "clean" way to do this. If not is there another way
I can gracefully deal with a user entering a bad login name and/or password
in my application?

Thanks in advance.

Regards.

Andy Cranston.

________________________________________________________________________
This message has been checked for all known viruses by the Selway Moore
scanning service powered by MessageLabs. For further information and
statistics on current viruses visit http://www.messagelabs.com/stats.asp
________________________________________________________________________



  • [freetds] dblib question - handling bad login name/password from a user, Andy Cranston, 04/26/2004

Archive powered by MHonArc 2.6.24.

Top of Page