dbTalk Databases Forums  

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

comp.databases.sybase comp.databases.sybase


Discuss DB-Library error using dbopen() DB-Library: Unexpected EOF fromSQL Server in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Antonio Di Sabatino
 
Posts: n/a

Default DB-Library error using dbopen() DB-Library: Unexpected EOF fromSQL Server - 05-15-2009 , 12:10 PM







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


Reply With Quote
  #2  
Old   
joe.no_junk@gmail.com
 
Posts: n/a

Default Re: DB-Library error using dbopen() DB-Library: Unexpected EOF fromSQL Server - 05-15-2009 , 09:38 PM






On May 15, 10:10*am, Antonio Di Sabatino <adisa... (AT) gmail (DOT) com> wrote:
Quote:
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


Reply With Quote
  #3  
Old   
Antonio Di Sabatino
 
Posts: n/a

Default Re: DB-Library error using dbopen() DB-Library: Unexpected EOF fromSQL Server - 05-17-2009 , 04:09 AM




no erros no strange messages on sybase log

thanks a lot,

you welcome



On May 16, 4:38*am, "joe.no_j... (AT) gmail (DOT) com" <joe.weinst... (AT) gmail (DOT) com>
wrote:
Quote:
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 -


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.