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
A trouble with "select" from Oracle DB [message #29396] Mon, 18 October 2010 15:52 Go to previous message
porto is currently offline  porto
Messages: 51
Registered: March 2007
Member
I have a problem with selecting data from the DB (Oracle ver. 10.2). The database has a table that contains 14,124 rows. When I try to fetch data with this code:
Oracle8 oracle;
oracle.Open("user/pass@server/db", false));
Sql sql(oracle);
sql.Execute("select * from IKIS_ERS.INSUR_ANKT_A");
while(sql.Fetch())
Cout() << sql[0] << "\n";

I get only 345 rows. When I try to select data from the database using the same SQL query with "SQLPlus Worksheet" (its a tool from Oracle), I get 14,600 (why not 14,124 I don't know).

When I tried to insert settrace(), in the log I got:
Error: ORA-01406: fetched column value was truncated
This is what a found about this error:
Quote:

ORA-01406:fetched column value was truncated

Cause: In a host language program, a FETCH operation was forced to truncate a character string. The program buffer area for this column was not large enough to contain the entire string. The cursor return code from the fetch was +3.

Action: Increase the column buffer area to hold the largest column value or perform other appropriate processing.


How can I increase the column buffer?

Sorry for bad English.

[Updated on: Mon, 18 October 2010 20:21]

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: Mon Apr 29 09:22:41 CEST 2024

Total time taken to generate the page: 0.02290 seconds