Text_IO.get_line returning NULL instead of page eject (^L) character [message #159298] |
Fri, 17 February 2006 04:09 |
avjosh
Messages: 2 Registered: February 2006
|
Junior Member |
|
|
Hi Everybody,
I have written a form module, which will split a character mode report text file to be able to print the report from desired page onwards. I am using Text_IO package to read the original file and to generate new file with contents from desired page onwards.
The problem is that, Get_line is returning null in place of a page eject character (^L), resulting in incorrect pagination.
Is there a way to trap control characters from source file ?
Please help
warm regards
[Updated on: Mon, 06 March 2006 21:47] by Moderator Report message to a moderator
|
|
|
|
Re: Text_IO.get_line returning NULL instead of page eject (^L) character [message #160071 is a reply to message #159473] |
Thu, 23 February 2006 01:14 |
avjosh
Messages: 2 Registered: February 2006
|
Junior Member |
|
|
Hi Everybody
I have found the reason for ^L character being ignored.
I wrote the procedure to read the text file line by line and insert it into a temporary table with a varchar2(300) column.
When I temporarily changed this procedure to return the line read using get_line as an out parameter, it returned the ^L character correctly, which could be identified by displaying it's ASCII value(12).
But still if I try to insert the line as it is into the table, the row results in a null string. Though now I managed to handle the situation by trapping this ^L char at procedure level & insert required no.of blank lines, my doubt is
DOES THIS MEAN THAT A VARCHAR2 VARIABLE & A VARCHAR2 COLUMN HAVE DIFFERENT DATA STORAGE CAPABILITIES?
DOES THIS MEAN THAT VARCHAR2 VARIABLE CAN HOLD A NON-PRINTING CONTROL CHAR BUT VARCHAR2 COLUMN WILL REPLACE THIS COLUMN WITH A NULL STRING?
Hope someone will be able to give some satisfactory reason. I have gone thru Oracle help on CREATE TABLE column definition, but could not find mention of any such issue.
with warm regards
|
|
|
|