![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
On May 15, 10:10*am, Antonio Di Sabatino <adisa... (AT) gmail (DOT) com> wrote: 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 check the DBMS error log. The DBMS is hanging up on you. Joe- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |