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 |
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
|
|
|
|
|
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: Mon Apr 29 09:22:41 CEST 2024
Total time taken to generate the page: 0.02290 seconds
|