Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » A trouble with "select" from Oracle DB
Re: A trouble with "select" from Oracle DB [message #29405 is a reply to message #29396] Tue, 19 October 2010 10:02 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

I tested with 193066 rows without any problem.

The code:
Oracle8 oracle_conn;
String result;
	TimeStop v_timer;
	if(oracle_conn.Login("user", "password", "host:port/SID", true)){
		result << "\n connection time: " << v_timer;
		v_timer.Reset();
		Sql sql(oracle_conn);
		sql.Execute("select count(*) from AP_INVOICES_ALL");
		while(sql.Fetch())
			result << "\n total rows: " << sql[0];
		result << ", timer: " << v_timer;
		v_timer.Reset();
		sql.Execute("select INVOICE_ID, INVOICE_DATE from AP_INVOICES_ALL");
		int i = 0;
		while(sql.Fetch()){
			++i;
			result << "\n" << i << ". " << sql[0] << " - " << sql[1];
		}
		result << ", timer: " << v_timer;
		v_timer.Reset();
	}else
		result << "error to connect";


and output:
Quote:



connection time: 0.312
total rows: 193066, timer: 0.047
1. 10000 - 12/31/1998
2. 10001 - 12/31/1998
3. 10002 - 12/31/1998
4. 10003 - 12/31/1998
5. 10004 - 12/31/1998
6. 10005 - 12/31/1998
......................
193065. 246828 - 07/01/2010
193066. 246897 - 07/30/2010, timer: 9.781



Result:
1. the problem can be with your oracle DB
2. or if you run the code in terminal then you can see only last 3XX rows.

Best Regards,
Ion Lupascu(tojocky).

Added: Oracle DB: 10.2.0.4
Server: Linux RedHat 4
Client: Windows XP SP3.
Tested with string columns - no problems!

[Updated on: Tue, 19 October 2010 10:15]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: tar library for u++
Next Topic: Maybe stupid qustions for UPP developers...
Goto Forum:
  


Current Time: Wed May 15 02:50:16 CEST 2024

Total time taken to generate the page: 0.02999 seconds