Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - Sybase  »  DB-Library error using dbopen() DB-Library:...
Page 1 of 1    

DB-Library error using dbopen() DB-Library:...

Author Message
Antonio Di Sabatino...
Posted: Fri May 15, 2009 5:10 pm
Guest
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.no_junk at (no spam) gmail.com...
Posted: Sat May 16, 2009 2:38 am
Guest
On May 15, 10:10 am, Antonio Di Sabatino <adisa... at (no spam) gmail.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
 
Antonio Di Sabatino...
Posted: Sun May 17, 2009 9:09 am
Guest
no erros no strange messages on sybase log

thanks a lot,

you welcome



On May 16, 4:38 am, "joe.no_j... at (no spam) gmail.com" <joe.weinst... at (no spam) gmail.com>
wrote:
Quote:
On May 15, 10:10 am, Antonio Di Sabatino <adisa... at (no spam) gmail.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 -
 
 
Page 1 of 1    
All times are GMT
The time now is Sat Nov 28, 2009 4:14 pm