help---I can't open oracleDB in web browser.
hello .
I'm a Oracle user ,and developing Linux/CGI/Proc_c++ programs.
Now , there is a strange error when programs opened by web browser (netscape/IE).
my program is no error runing in text-output model.(in command line : ./test2_3.o)
but when it works in web brower,it dispaly error message:
1. "Error while trying to retrieve next for error ORA-12545" ---when I "EXEC SQL CONNECT : user_name IDENTIFIED BY : pass_word;"
2."error:ORA-01012:unable to open message file (SQL-02113)"---when I execute any select orders.(I think it was because that I have not open the OracleDB yet.)
I can't understand why it's all right in text-model but error in web browser!
my pro_c++ code is below:
---------------test2_3.pc-----------
#include <iostream>
#include <string>
#include <stdio.h>
#include <string.h>
#include <sqlca.h>
#include <oraca.h>
using namespace std;
#include "mylib.cpp"
#include "html_function.cpp"
void main ()
{
html_begin ("read sitedbshm");
EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error:"); // 出错声明
EXEC SQL BEGIN DECLARE SECTION; file://数据库变量声明
VARCHAR user_name[LEN_USER_NAME];
VARCHAR pass_word[LEN_PASS_WORD];
char aaa_c[10],bbb_c[10];
EXEC SQL END DECLARE SECTION;
user_name.len = strlen ( strcpy ((char *) user_name.arr, "aaa" ) );
pass_word.len = strlen ( strcpy ((char *) pass_word.arr, "aaa" ) );
EXEC SQL CONNECT : user_name IDENTIFIED BY : pass_word
EXEC SQL DECLARE sql_result CURSOR FOR
SELECT aaa,bbb
FROM tablename1
where rownum <=8
EXEC SQL OPEN sql_result ;
EXEC SQL WHENEVER NOT FOUND DO break ;
cout << "<table border>";
for ( ; ; )
{
EXEC SQL FETCH sql_result INTO :aaa_c , :bbb_c ;
cout <<"<tr><td>aaa="
<< aaa
<<"<td> bbb="
<< bbb;
}
EXEC SQL CLOSE sql_result ;
cout << "connection has been closed.\n";
EXEC SQL COMMIT WORK RELEASE;
html_end();
}
-------------------------------------------------
compile it to test2_3.o and copy it to /cgi-bin
now ,the <table> has been displayed correctly, but oracle's error string in it ~_~!
please help me !!!!!!!!!!!!!!!!!!!!!!!
thank you very much^o^
Happywind