Skip to Content.
Sympa Menu

freetds - [freetds] freetds] Bus error with dbopen when FreeTDS on Solaris 8

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ldai" <ldai AT accunettech.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] freetds] Bus error with dbopen when FreeTDS on Solaris 8
  • Date: Tue, 24 Aug 2004 11:05:26 +0800

Hi,everybody:
I have met a strange problem with freetds's db-lib.
I am only to do connecting sqlserver operation in solaris 8. When my code
ran more than 2 days. I got a bus error.
I found bus error would occur when calling dbopen and didn't return any
value.
My test code is multithread and I must free any memory and struction
strictly.
Do you meet so strange problem? Can you help me? Or give me some advice.
Thank you very much.

My code is running in solaris , Freetds package is 0.62.4 ,sqlserver 2000
+ win2000Server and tds version is 4.2.
My test code is written in C language.
This is core code in my test code:
|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if (dbinit() == FAIL)
{
strcpy(cfReturnMessage, "");
strcpy(cfReturnMessage, "Failed to connect
database. ");
iFailFlag++;
goto f_error;
}
login = dblogin();
if(login==NULL)
{
strcpy(cfReturnMessage, "");
strcpy(cfReturnMessage, "Failed to connect
database. ");
iFailFlag++;
goto f_error;
}
if( login < 0)
{
strcpy(cfReturnMessage, "");
strcpy(cfReturnMessage, "Failed to connect
database. ");
goto f_error;
}
DBSETLUSER(login, sUserName);
DBSETLPWD(login, sPasswd);
DBSETLAPP(login, "Leon-2");
//This point will occur bus error when calling more than 2
days.
dbproc = dbopen(login, sServerName);
if(dbproc==NULL)
{
strcpy(cfReturnMessage, "");
strcpy(cfReturnMessage, "Failed to connect
database. ");
goto f_error;
}





Archive powered by MHonArc 2.6.24.

Top of Page