Home » Developer & Programmer » Precompilers, OCI & OCCI » Printing of the sqlstmt during execution (pro c on Oracle 11)
Printing of the sqlstmt during execution [message #472707] Mon, 23 August 2010 06:47 Go to next message
razdany
Messages: 4
Registered: August 2010
Location: Israel
Junior Member
Hi,
I am having a core dump while running exe that uses services in pro c to go to the DB
the sentence that causes the dump is:
sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);

I need to print the &sqlctx, &sqlstm, &sqlfpn just before the call.
tried " printf("from select sqlstmt %s \n", sqlstmt);
but it only prints the " from select sqlstmt "
can any one pleae help.
Thanks,
Dany.
Re: Printing of the sqlstmt during execution [message #472716 is a reply to message #472707] Mon, 23 August 2010 07:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
but it only prints the " from select sqlstmt "

So it proves the content of the statement is the empty string.

Regards
Michel
Re: Printing of the sqlstmt during execution [message #472718 is a reply to message #472716] Mon, 23 August 2010 08:08 Go to previous messageGo to next message
razdany
Messages: 4
Registered: August 2010
Location: Israel
Junior Member
Hi,
thanks for the reply . but it cann't be empty because the query is being executed
the printing is not done correctly
Re: Printing of the sqlstmt during execution [message #472719 is a reply to message #472718] Mon, 23 August 2010 08:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So the code is wrong, fix it.

Regards
Michel
Re: Printing of the sqlstmt during execution [message #472738 is a reply to message #472719] Mon, 23 August 2010 09:28 Go to previous messageGo to next message
razdany
Messages: 4
Registered: August 2010
Location: Israel
Junior Member
most of the times it works - I suspect there is a problem with Oracle becuause when I run it in debug it all looks good and 99.9% of the time it is ok but sometimes it crashes and creaqtes a core - I need to print the statment to see if I send the variables correctly
Re: Printing of the sqlstmt during execution [message #472743 is a reply to message #472738] Mon, 23 August 2010 09:34 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I suspect a problem in your code leading to overwrite stack memory.

Regards
Michel
Re: Printing of the sqlstmt during execution [message #472744 is a reply to message #472743] Mon, 23 August 2010 10:02 Go to previous message
razdany
Messages: 4
Registered: August 2010
Location: Israel
Junior Member
there might be a problem in the code - but I cann't find it - there are thousends of code line in the EXE
I need to print the sqlstm in order to see what I send to Oracle
Previous Topic: OCINewPassword and NLS_LANGUAGE
Next Topic: XMLELEMENT TAG
Goto Forum:
  


Current Time: Thu Mar 28 18:22:01 CDT 2024