Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DB-Library error using dbopen() DB-Library: Unexpected EOF from SQL Server

81 views
Skip to first unread message

Antonio Di Sabatino

unread,
May 15, 2009, 1:10:16 PM5/15/09
to

Hi,

i have big and very strange problem on my c++ program that connect to
sybase to exec some queries,

here the code:
/*connection to sybase */

if ( dbsybinit() == -1 ) return -1;

m_login = dblogin();

DBSETLUSER(m_login, (char*) m_loginName.c_str() );
DBSETLPWD(m_login, (char*) m_password.c_str() );
DBSETLAPP(m_login, (char*) m_applicationName.c_str() );
//DBSETLNATLANG(m_login, (char*) m_linguage.c_str() );

std::cout << "Called open connection:" << std::endl;

if ( m_dsquery=="" ) {

if ((m_dbproc = dbopen(m_login, NULL)) == (DBPROCESS *) NULL ||
(DBDEAD(m_dbproc)) )
{
std::cout << "error on dbopen " << std::endl;
dbexit();
} else
std::cout << "pid: " << m_dbproc->dbspid << std::endl;

} else {

if ((m_dbproc = dbopen(m_login, (char*) m_dsquery.c_str())) ==
(DBPROCESS *) NULL || (DBDEAD(m_dbproc)) )
{
std::cout << "error on dbopen 2" << std::endl;
dbexit();
} else
std::cout << "pid: " << m_dbproc->dbspid << std::endl;
}

return 0;

--

the error is randomic:: DB-Library: Unexpected EOF from SQL Server
during the execution,

the sybase version,

dataserver -v
Adaptive Server Enterprise/12.5.3/EBF 13325 ESD#7/P/Sun_svr4/OS 5.8/
ase1253/1951/64-bit/FBO/Fri Mar 24 11:00:22 2006


isql -v
Sybase CTISQL Utility/12.5.1/P-EBF11760 ESD #2/DRV.12.5.1.0/SPARC/
Solaris 2.8/BUILD1251-002/64bit/OPT/Tue Mar 9 19:55:48 2004


any suggest is welcome,


thanks so mutch

Antonio

joe.we...@gmail.com

unread,
May 15, 2009, 10:38:56 PM5/15/09
to

check the DBMS error log. The DBMS is hanging up on you.
Joe

Antonio Di Sabatino

unread,
May 17, 2009, 5:09:36 AM5/17/09
to

no erros no strange messages on sybase log

thanks a lot,

you welcome

On May 16, 4:38 am, "joe.no_j...@gmail.com" <joe.weinst...@gmail.com>
wrote:

> Joe- Hide quoted text -
>
> - Show quoted text -

0 new messages