[freetds] Problem with connection.

ikorot at earthlink.net ikorot at earthlink.net
Tue Jan 5 15:43:09 EST 2010

Hi, Fernando,

-----Original Message-----
>From: Fernando <fer.pantaneiro at gmail.com>
>Sent: Jan 5, 2010 3:00 PM
>To: freetds at lists.ibiblio.org
>Subject: [freetds] Problem with connection.
>Hi folks,
>I'm new in the FreeTDS world, and I'm building my first app with it.
>But I'm having a problem whit the "dbopen" function. When the app call
>it, the function return an error and the message: "FreeTDS: db-lib:
>exiting because client error handler returned 0 for msgno 20009".
>Does anyone knows what this error message mean??
>Fernando Castro
>Using openSUSE 11.2 "Emerald" and kernel

You didn't mention FreeTDS version and the server you are trying to
connect to...
It is also helpful to see the freetds.conf file content.

But as usual try to do this:
1. Try to connect using telnet.
2. Try to connect using tsql.
3. Try to connect using FreeTDS scripts.

Thank you.

>---------------------------------- My code -------------------------
>if (dbinit() == FAIL)
>	fprintf(stderr, "page1.c %d: dbinit() failed\n",  __LINE__);
>	exit(1);
>if ((login = dblogin()) == FAIL)
>	fprintf(stderr, "ERROR! dblogin() page1.c.\n");
>	return FALSE;
>DBSETLUSER(login, login_t.username);
>DBSETLPWD(login, login_t.password);
>if (gethostname(hostname, max_len) == 0)
>	DBSETLHOST(login, hostname);
>/* works fine until here, then I got the error here, not even enter in
>the if statement */
>if ((dbconn = dbopen(login, DBSERVER)) == NULL)
>	fprintf(stderr, "ERROR! dbopen() page1.c.\n");
>	return FALSE;
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org

More information about the FreeTDS mailing list