Re: Problem with connection.

Fernando <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Thanks for reply, and sorry not mention it.

I'm trying to connect with a MS SqlServer 2008 using the freetds v0.82.

Here are the result of my ./tsql -C

Compile-time settings (established with the "configure" script)
                                    Version: freetds v0.82
                freetds.conf directory: /usr/local/freetds/etc
   MS db-lib source compatibility: no
       Sybase binary compatibility: no
                           Thread safety: yes
                              iconv library: yes
                              TDS version: 5.0
                                     iODBC: no
                                  unixodbc: no

And I successfuly connected with tsql, by the commnad: >./tsql -S
sqlserver -U xxxxx -P xxxxx (using the freetds.conf file, not
bypassing it)

Here is my freetds.conf file:

# My SqlServer 2008 Microsoft server
[sqlserver]
        host = xxx.xxx.xxx.xxx
        port = 1433
        tds version = 8.0
        timeout = 15
        connect timeout = 20
        dump file = /tmp/freetds.log
        debug flags = 0x4fff

Thanks again.
Fernando

On Tue, Jan 5, 2010 at 5:43 PM,  <[email protected]> wrote:
> Hi, Fernando,
>
>
> -----Original Message-----
>>From: Fernando <[email protected]>
>>Sent: Jan 5, 2010 3:00 PM
>>To: [email protected]
>>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??
>>
>>Regards,
>>Fernando Castro
>>Using openSUSE 11.2 "Emerald" and kernel 2.6.31.5-0.1-default.
>
> 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
>>[email protected]
>>http://lists.ibiblio.org/mailman/listinfo/freetds
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.