Skip to Content.
Sympa Menu

freetds - bug report

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: <ydok AT 21bc.com>
  • To: <freetds AT franklin.oit.unc.edu>
  • Subject: bug report
  • Date: Thu, 29 Mar 2001 16:48:17 +0800

i has three servers,one is nt server(with sql server7 on it),the other two are linux and solaris8.
i installed freetds on the linux and solaris server(using the same release).
i try to connect the sql server from linux and
solaris8,on linux it works well,but on solaris
it dosen't.the follow is my program:
#include <stdio.h>
#include <string.h>
#include "/opt/tds/include/tds.h"
///connect to database
///login--database user
///passwd--password of database user
///server--server name or ip
int try_tds_login(
   TDSLOGIN  **login,
   TDSSOCKET **tds,
   char * user,
   char * passwd,
   char * server)
{
   if (! login||! tds)
   {
   log_debug (DEBUG5, "invalid login or tds parameter");
       return TDS_FAIL;
   }
  
   *login = tds_alloc_login();
   if (! *login)
   {
     log_debug (DEBUG5, "tds_alloc_login() failed.\n");
      return TDS_FAIL;
   }
   tds_set_passwd(*login, passwd);
   tds_set_user(*login, user);
   tds_set_server(*login, server);
   tds_set_app(*login, "ftp server");
   tds_set_host(*login, "myhost");
   tds_set_library(*login, "TDS-Library");
   tds_set_charset(*login, "gb2312");
   tds_set_language(*login, "us_english");
   tds_set_packet(*login, 512);
 
   *tds = tds_connect(*login);
   if (! *tds)
   {
      log_debug (DEBUG5, "tds_connect() failed\n");
      return TDS_FAIL;
   }
 
   return TDS_SUCCEED;
}


  • bug report, ydok, 03/29/2001

Archive powered by MHonArc 2.6.24.

Top of Page