Home » Developer & Programmer » Precompilers, OCI & OCCI » sql connection
sql connection [message #292504] Wed, 09 January 2008 01:45 Go to next message
satish@123
Messages: 15
Registered: February 2006
Junior Member

The below is my sample cc file code
struct sqlexd sqlstm;
//some code
sqlstm.stmt = "select * into :s1:s2 ,:s3:s4 ,:s5:s6 ,:s7:s8 from " //select statement

switch(sqlca.sqlcode)
{
case 0:
return success;
default:
return error;
}

while debugging before executing sql statement i stopped the oracle by shutdown abort. sqlca.sqlcode shown as -3114. I started oracle and i executed sqlstm.stmt even now alse sqlca.sqlcode is showing as -3114 (even after starting oracle).


Please tell me what could be the reason for this?
Re: sql connection [message #292519 is a reply to message #292504] Wed, 09 January 2008 02:06 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Did you reconnect?

Regards
Michel
Re: sql connection [message #292531 is a reply to message #292519] Wed, 09 January 2008 02:51 Go to previous messageGo to next message
satish@123
Messages: 15
Registered: February 2006
Junior Member
steps that i did

1. Placed a break point in sqlstmt
2. stopped the oracle
3. executed the query
4. in the switch statement sqlca.sqlcode shown -3114
5. went back to sqlstmt breakpoint (in the same process)
6. started the oracle
7. executed the query
8. switch statement again shown -3114 but i started the oracle.

After starting oracle will it be a new instance?
sqlca will refer to old instance even if i started oracle?





Re: sql connection [message #292547 is a reply to message #292531] Wed, 09 January 2008 03:27 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So you didn't reconnect and you got the code "ORA-03114: not connected to ORACLE", I don't see anything strange in this.

Regards
Michel
Previous Topic: pro*c compilation error
Next Topic: Debian: Pro*C doesn't work well with gcc 4.1 system?
Goto Forum:
  


Current Time: Sun Dec 04 08:29:29 CST 2016

Total time taken to generate the page: 0.07906 seconds