Home » Community » Newbie corner » A trouble with "select" from Oracle DB
Re: A trouble with "select" from Oracle DB [message #29428 is a reply to message #29425] |
Tue, 19 October 2010 16:21   |
|
porto wrote on Tue, 19 October 2010 16:34 | I replaced original text whih "sometext" string.
connection time: 0.141
total rows: 14600, timer: 0.000
1. sometext1
2. sometext2
3. sometext3
................
343. sometext343
344. sometext344
345. sometext345
|
Please, change the class constructor code like this:
OracleTest::OracleTest(){
CtrlLayout(*this, "Window title");
Sizeable().MaximizeBox().MinimizeBox().Maximize();
String result;
TimeStop v_timer;
if(oracle_conn.Login("user", "pass", "host:port/SID", true)){
result << "\n connection time: " << v_timer;
v_timer.Reset();
Sql sql(oracle_conn);
if(sql.Execute("SELECT COUNT(*) FROM IKIS_ERS.INSUR_ANKT_A")){
while(sql.Fetch())
result << "\n total rows: " << sql[0];
result << ", timer: " << v_timer;
v_timer.Reset();
}else result << "error: " << sql.GetLastError();
if(sql.Execute("SELECT IAN_NAME1 FROM IKIS_ERS.INSUR_ANKT_A")){
int i = 0;
while(sql.Fetch()){
++i;
result << "\n" << i << ". " << sql[0];
}
result << ", timer: " << v_timer;
v_timer.Reset();
}else result << "error: " << sql.GetLastError();
}else
result << "error to connect";
LogCtrl.Set(result);
}
replace connection parameters!
Write your result and attach the log file.
ADDED: change the code. add GetLastError().
[Updated on: Tue, 19 October 2010 16:26] Report message to a moderator
|
|
|
 |
|
A trouble with "select" from Oracle DB
By: porto on Mon, 18 October 2010 15:52
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 09:28
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 09:43
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 10:02
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 10:35
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 10:46
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 10:53
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 11:33
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 13:15
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 13:35
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 13:53
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 14:28
|
 |
 |
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 14:44
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 15:15
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 15:34
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 16:21
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 16:31
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 17:00
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 17:14
|
 |
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Wed, 20 October 2010 09:15
|
 |
|
Re: A trouble with "select" from Oracle DB
By: porto on Wed, 20 October 2010 09:54
|
Goto Forum:
Current Time: Wed Jul 16 18:31:23 CEST 2025
Total time taken to generate the page: 0.02898 seconds
|