Problem with formatting date with JSTL ans swedish locale
Hi,
I have a strange problem with JSTL fmt:formatDate -tag and swedish locale.
-------------------------- Extract from the JSP ------------------------------
<jsp:useBean id="date" class="java.util.Date" />
<fmt:formatDate value="${date}" pattern="dd.MM.yyyy HH:mm" />
With en_US and fi_FI locales date is printed just the way I want: 29.04.2005 13:28 but in se_SE locale it is printed: Fri Apr 29 13:30:09 EEST 2005
Has anyone had this problem before?
Thanks in advance!
Hi
Try using "sv_SE" locale.
Similar Messages
-
Problem while uploading data with GUI UPLOAD Function
Hi,
I am facing problem while uploading data with FM GUI UPLOAD in out text file there are 7 row but after the FM GUI UPLOAD there are 14 entries are coming in Internal table and each alternate row is coming as blank with 0000 in some column in internal table first row is proper and second line is blank so on.
what can be the problem .
The program in which we are using this we are using it from last 2 year but we are facing problem today only.
regards,
zafarHi,
The file formate is same as it is from last two years it is automatically generated by one another bar code server and there is no change in the file formate.
So waht can be the problem to check any inconsistancy in system i have develop a samll program fro uploading a text file with same function module , but it is working fine.
regards,
zafar -
Problem with Save data with report
Post Author: ramprosoft
CA Forum: General
Hi,
I am new to CR and using Crystal Reports XI with SQL Server 2000.
I'm not able to remove the saved data in a report. I have played around different options, but unfortunately I'm not able to remove the data. I have checked variouse places in web above this issue not able to find a solution, so decided to open a new post. The problem is :
I have created a simple report and saved with-out data (1st version) the file size was 16KB. After few changes I have saved the same report with Data, the file size become 1065 KB. Its perfect and I can view the report in Report Viewer. Great Stuff!. Now the Testing completed, I would like to move this report to production environment, I notice that I'm unable to remove the data. I have played around various tricks like below, but it didnt work well.
Trick 1:
Uncheck: File->Options->Reporting (tab)->Save Data With Report.
Check: File -> Options -> Reporting (tab)->Discard Saved data on Open,
Uncheck: file-> Report Options -> Save Data With Report.
File -> Save Data with Report (Not selected)
Opened the report and try "save" and also tried "save as", still the size is 1065.
Trick 2:
I enabled all "Save Data with report" feature. Deleted all the rows in the table related to the query, previewed the report and Saved the report with "Save Data with report" featuer. But now, the funny part happen, the file size increased to 1070kb, instead of reducing. Worst Stuff!!!
Trick 3:
Updated the latest version of Patch and tried above tricks, still i'm not able to remove the data.
Appreciate, if you could help me to fix the problem.
thanks in advancePost Author: salmanq
CA Forum: General
Hi, This
post is very informative, however I would like some specific information. If
someone can help me then please send me a private message. Best Regards,
Wholesale Pages UK Dropshippers
| Wholesale Suppliers
Australia Wholesalers and
Dropshippers | Dubai Property and Real Estate -
Use of "with master data & with out master data" at DTP update level
Hello experts,
In DTP, I check "with out master data". When I try to send corresponding transactional data, It is showing SID related error. Can anybody suggest what is the use of "with master data & with out master data" at DTP level.
Thanks in advance,
Zakir.HI
HI in DTP level If you set this indicator, the system terminates the update of the request if no values are available for a data record.
Load the relevant master data before you load the transaction data.
If you set this indicator, the system terminates activation if master data is missing and produces an error message.
If you do not set this indicator, the system generates any missing SID values during activation.
In DataStore maintenance, if you do not set the SIDs Generation upon Activation indicator, the No Update without Master Data indicator in the DTP has no effect.
thx
vijju -
Issue with format: date dd-MMM-yyyy - First letter lower instead of capital
Hi colleagues,
I am facing a problem using: <?format-date:FIELD_NAME;’dd-MMM-yyyy’;'UTC'?> on my RTF template.
When the report run on English it retrieves: Apr, Jun, ...
but in French it retrieves: apr, jun.
The client wants the first letter of the month in capital letter I thought that MMM is the format to manage it...
I am using XML Publisher with PeopleSoft.
The template is in French and using bursting I create the report in different language depending on some parameters.
When I preview the template everything is ok.
Does anyone knows where is the Abbreviate Name of the Month comes from?
Thanks in advance,
Juan DiegoHi Juan
It ought to be returning 'Arv' not 'apr' in French right?
It might be an issue with the i18n library that is being shipped. I would suggest logging a service request with support for some help.
Regards
tim -
How to use format-date with the report parameter
Hi all,
How to use the format-date function with this tag,
<?param@begin:P_FROM_DATE?><?$P_FROM_DATE?>
this form date is coming from report parameter and is coming like this 2012/11/01 00:00:00.
So now i need this in DD-MON-YYYY fromat.I tried like this <?param@begin:P_FROM_DATE?><?$format-date:P_FROM_DATE;'DD-MON-YYYY'?>
but its giving error. Can any one pls tell how to convert it to customized date format.
thanks & Regards
Srikkanth.MIssue solved.
Ref this link
XML date Format -
How to format date with in the file
Hi,
I have the below data in a file,
101 02100002111406893401207310900A094101xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5200xxxxxxxxxx D18000_1 CCDXXXXXXX JUL 31201207 1140689340000001
622113010547999999999003 000333333334RE 00030137 onee SYSTEM 0140689340000001
62200000 0000999999999001 0000011111CR460 00030135 twoo system 0140689340000002
82000000040015507087000000000000000003571110D18000_1 140689340000001
Can some one tell me how to read the date which is there in line 1 which is starting with indicator 1 at position 24 to 29
in this example it is 120731
which is in YYMMDD format
I want to replace from 70 to 75 with above date + 2 as 120802 in 2nd line which starts with indicator 5
My output should look like below in a file again
101 02100002111406893401207310900A094101xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5200xxxxxxxxxx D18000_1 CCDXXXXXXX JUL 31120802 1140689340000001
622113010547999999999003 000333333334RE 00030137 onee SYSTEM 0140689340000001
62200000 0000999999999001 0000011111CR460 00030135 twoo system 0140689340000002
82000000040015507087000000000000000003571110D18000_1 140689340000001
Can some one please tell me how to do this?
Appreciate your response.The following will help you to extract the date and perform an arithmetic function on a date:
olddate=$(head -1 myfile | cut -c 24-29)
newdate=$(date -d "20${olddate} + 2 days" "+%y%m%d")You may have to implement some logic if the year is before this century, e.g 1999. For the rest I suggest you look into awk or sed to perform a string replacement based on character position.
Edited by: Dude on Aug 7, 2012 12:57 PM -
Formatting Dates with Javascript
Hi all. I'm tryign to find the solution on the web, but have
not had much
success yet.
I"m working on a customized button my my HTMLArea script that
puts a WYSIWYG
component on my form fields to insert the date.
My code is here:
editor.insertHTML((new Date()).toString());
Which outputs this:
Fri Nov 17 2006 10:08:35 GMT-0600 (Central Standard Time)
What I'm wanting to do is to output
Friday, November 17, 2006 with no timestamp, and no reports
of GMT/CST.
Any suggestions on where I can go to look? I've been at the
W3C, but I did
not see any way to format my string.
I've tried a lot of variations in trying to format the date
witha string,
but have not had any success.
This was my last script, which erred:
var d = new Date();
d.formatDate("D, M j");
d.toString();
editor.insertHTML(d);
TIA,
Jon Parkhurst
PriivaWeb
http://priiva.net.Thanks Mick, Reviewing now.
"Mick White" <[email protected]> wrote in
message
news:ejl3t8$sho$[email protected]..
> crash wrote:
>> Hi all. I'm tryign to find the solution on the web,
but have not had
>> much success yet.
>>
>> I"m working on a customized button my my HTMLArea
script that puts a
>> WYSIWYG component on my form fields to insert the
date.
>>
>> My code is here:
>> editor.insertHTML((new Date()).toString());
>>
>> Which outputs this:
>> Fri Nov 17 2006 10:08:35 GMT-0600 (Central Standard
Time)
>>
>> What I'm wanting to do is to output
>> Friday, November 17, 2006 with no timestamp, and no
reports of GMT/CST.
>
>
http://www.mickweb.com/javascript/dates/customDate.html
>
> editor.insertHTML(customDateString());
>
>
http://www.mickweb.com/javascript/dates/date.js
>
> function customDateString() {
> var now = new
Date(),H=now.getHours(),M=now.getMinutes();
> M=M<10?"0"+M:M;
> d =
>
["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
> [now.getDay()]+", ";
> d+=
> ["January","February","March","April","May","June",
>
"July","August","September","October","November","December"]
> [now.getMonth()]+" ";
> d+=now.getDate()+" "+now.getFullYear();
> d+=", "+H%12+":"+M+["AM","PM"][Number(H>11)||H==0];
> return d
> }
>
> Mick
>
>>
>> Any suggestions on where I can go to look? I've been
at the W3C, but I
>> did not see any way to format my string.
>> I've tried a lot of variations in trying to format
the date witha
>> string, but have not had any success.
>> This was my last script, which erred:
>>
>> var d = new Date();
>> d.formatDate("D, M j");
>> d.toString();
>>
>> editor.insertHTML(d); -
SQL Loader Oracle 10g problem in upload date with time data -- Very urgent.
Hi
I am trying to upload data using SQL loader. There are three columns in the table
defined as DATE. When I tried upload a data like this '2007-02-15 15:10:20', it is not loading time part. The date stored as 02/15/2008' only. There is not time on that. I tried with many different format nothing work. Can please help me ?
I have also tried with to_date --> to_timestamp it did not work.
The application is going to be in production, I cannot change DATE to TIME STAMP. This is very urgent.
LASTWRITTEN "decode(:LASTWRITTEN,'null',Null, to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:Mi:SS'))",
CREATEDON "decode(:CREATEDON,'null',Null, to_date(:CREATEDON,'YYYY-MM-DD HH24:Mi:SS'))",
LASTUPDATEDON(21) "decode(:LASTUPDATEDON,'null',Null, to_date(:LASTUPDATEDON(21),'DD/MM/YYYY HH24:MI:SS'))"Your problem is most likely in decode - the return type in your expression will be character based on first search value ('null'), so it will be implicitly converted to character and then again implicitly converted to date by loading into date column. At some of this conversions you probably are loosing your time part. You can try instead use cast:
SQL> desc t
Name Null? Type
LASTWRITTEN DATE
CREATEDON DATE
LASTUPDATEDON DATE
SQL> select * from t;
no rows selected
SQL> !cat t.ctl
LOAD DATA
INFILE *
INTO TABLE T
TRUNCATE
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
LASTWRITTEN
"decode(:LASTWRITTEN,'null',cast(Null as date),
to_date(:LASTWRITTEN,'YYYY-MM-DD HH24:MI:SS'))",
CREATEDON
"decode(:CREATEDON,'null',cast(Null as date),
to_date(:CREATEDON,'YYYY-MM-DD HH24:MI:SS'))",
LASTUPDATEDON
"decode(:LASTUPDATEDON,'null',cast(Null as date),
to_date(:LASTUPDATEDON,'DD/MM/YYYY HH24:MI:SS'))"
BEGINDATA
2007-02-15 15:10:20,null,null
null,2007-02-15 15:10:20,null
null,null,15/02/2007 15:10:20
SQL> !sqlldr userid=scott/tiger control=t.ctl log=t.log
SQL*Loader: Release 10.2.0.3.0 - Production on Fri Feb 29 00:20:07 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 3
SQL> select * from t;
LASTWRITTEN CREATEDON LASTUPDATEDON
15.02.2007 15:10:20
15.02.2007 15:10:20
15.02.2007 15:10:20Best regards
Maxim -
Statement terminator problems when exporting data with SQL Developer 3.2
I've ran across what appears to be a bug with SQL Developer 3.2.20.09. If someone can let me know if this is indeed a bug, or just something I need to configure differently, please let me know.
The problem is related to exporting a database as a SQL script, and terminator characters at the end of "create" statements, especially when columns have comments, and problems that occur when using SQLPlus to run the export script to create the tables. With the old SQL Developer 1.5.4, with the "Terminator" and "Pretty Print" options checked, statements like the following are generated:
-- DDL for Type NUM_ARRAY
CREATE OR REPLACE TYPE "NUM_ARRAY"
IS TABLE OF NUMBER(20)
-- DDL for Sequence MYTABLE_SEQ
CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;
-- DDL for Table MYTABLE
CREATE TABLE "MYTABLE"
( "MYTABLE_ID" NUMBER,
"COL2" NUMBER,
"COL3" NUMBER
-- DDL for Table ANOTHERTABLE
CREATE TABLE "ANOTHERTABLE"
( "ANOTHERTABLE_ID" NUMBER,
"COL2" VARCHAR2(1024),
"COL3" VARCHAR2(1024)
COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.';
When I then run the script using SQLPlus, everything works fine. However, with SQL Developer 3.2.20.09, with the same options enabled, the same statements are generated like this:
-- DDL for Type NUM_ARRAY
CREATE OR REPLACE TYPE "NUM_ARRAY"
IS TABLE OF NUMBER(20)
-- DDL for Sequence MYTABLE_SEQ
CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE ;
-- DDL for Table MYTABLE
CREATE TABLE "MYTABLE"
( "MYTABLE_ID" NUMBER,
"COL2" NUMBER,
"COL3" NUMBER
-- DDL for Table ANOTHERTABLE
CREATE TABLE "ANOTHERTABLE"
( "ANOTHERTABLE_ID" NUMBER,
"COL2" VARCHAR2(1024),
"COL3" VARCHAR2(1024)
COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.';
Notice all of the extra slashes in there. If a slash is not used as a statement terminator, SQLPlus treats slashes as a command to repeat the last SQL statement, which causes many errors about tables or sequences already existing. So, I tried removing the "Terminator" flag from the export options. This lead to statements that looked a bit more promising:
-- DDL for Type NUM_ARRAY
CREATE OR REPLACE TYPE "NUM_ARRAY"
IS TABLE OF NUMBER(20)
-- DDL for Sequence MYTABLE_SEQ
CREATE SEQUENCE "MYTABLE_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE
-- DDL for Table MYTABLE
CREATE TABLE "MYTABLE"
( "MYTABLE_ID" NUMBER,
"COL2" NUMBER,
"COL3" NUMBER
-- DDL for Table ANOTHERTABLE
CREATE TABLE "ANOTHERTABLE"
( "ANOTHERTABLE_ID" NUMBER,
"COL2" VARCHAR2(1024),
"COL3" VARCHAR2(1024)
COMMENT ON COLUMN "ANOTHERTABLE"."ANOTHERTABLE_ID" IS 'This is a comment.'
The big problem, though, is in the statement for the table with a comment. Notice that there are two statements, but there is not a semicolon after either of them. This unfortunately causes the "COMMENT" statement to be appended to the "CREATE TABLE" statement before being executed, which causes the table to not be created (which causes even more errors later on when the script attempts to populate the table with data).
So, it would appear that this is a bug, but I'm not sure. Is there a way I can configure the export options to make SQL Developer export these statements like it used to in older versions?
Thanks,
-Bill>
So, it would appear that this is a bug, but I'm not sure.
>
That would be a bug. Thanks for reporting it and providing the detailed example.
>
Is there a way I can configure the export options to make SQL Developer export these statements like it used to in older versions?
>
No.
Leave the thread open. One of the developers for sql developer should be monitoring the forum and can provide more information. -
Formatting DATEs with FORMAT clause and not with "to_date()" ?
Well I know I could format a DATE inline with the to_date() function.
But is there a way to format it in a separate FORMAT clause similar to
numbers?
If yes how would a format of
dd.mm.yyyy
or
yyyy.mm.dd hh:mm:ss
look like?user559463 wrote:
Ok, again I am searching something like
COLUMN "expiry" FORMAT "YYYY.MM.DD HH:MM:SS"No, it can only be done via TO_CHAR or NLS_DATE_FORMAT. I think you should read SQL*Plus COLUMN command.
SY. -
Formatting Date with JavaScript
Hello guys,
is there a way to change the date format with JavaScript? I have a library with different fields.
I hope you can help me!
Best regards
MatthiasYes
Check below
http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/
function convertSPDate(d) {
* A function to convert a standard SharePoint
* date/time field (YYYY-MM-DD HH:MM:SS) to a
* javascript Date() object
* Author: Ben Tedder (www.bentedder.com)
// split apart the date and time
var xDate = d.split(" ")[0];
var xTime = d.split(" ")[1];
// split apart the hour, minute, & second
var xTimeParts = xTime.split(":");
var xHour = xTimeParts[0];
var xMin = xTimeParts[1];
var xSec = xTimeParts[2];
// split apart the year, month, & day
var xDateParts = xDate.split("-");
var xYear = xDateParts[0];
var xMonth = xDateParts[1];
var xDay = xDateParts[2];
var dDate = new Date(xYear, xMonth, xDay, xHour, xMin, xSec);
return dDate;
// create a couple of variables
var startTime;
var convertedStartTime;
// a standard SPServices call
$().SPServices({
operation: "GetListItems",
webURL: myListURL,
async:false,
listName: myListName,
CAMLRowLimit: 1,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function(i){
// set the value of startTime to standard SP date/time field
startTime = $(this).attr("ows_startTime");
// set the convertedStartTime to a true javascript date
convertedStartTime = convertSPDate(startTime);
http://spservices.codeplex.com/wikipage?title=$%28%29.SPServices.SPConvertDateToISO
http://stackoverflow.com/questions/14283106/beginner-javascript-date-conversion-from-string-to-utc-date-js-into-sharepoint
http://stackoverflow.com/questions/14742625/how-to-convert-utc-date-by-javascript -
Errros in formatting dates with milliseconds
I am writing a routine to convert a String to a Date.
I have created the following mask: "yyyy-MM-dd HH:mm:ss.SSSSS"
I pass this to SimpleDateFormat and then parse to return a java.util.Date.
The method works fine when the milliseconds are all zero, ie .00012. however when the milliseconds increase, the resuting time in the date object becomes anywhere from a minute to hours later than it should be.
For instance, "2006-09-28 10:23:16.214500" becomes
Thu Sep 28 10:26:50 EDT 2006 when the resulting date object is displayed.
Is this a bug with java 1.5?OK thanks, so how would I convert the date string
provided, keeping the millisecond presision? What is
that number if not 21% of a second?Let's say you can get the fractional part (0.214500) into a double variable called fractionalSeconds. You do that part.
int milliseconds = (int) (fractionalSeconds * 1000); // or you might want to round this off - you figure that out
Now you have the number of milliseconds int the above variable. Format your timestamp using the original time string (less the fractional part) plus "." plus milliseconds. Then you could use the parser on that.
That said, I bet you could just get the timestamp as a Java date/time directly rather than parsing it as a string, since you mentioned you're getting this from a database query. -
Problem loading Image data with French accent in file name
We have a very complex commercial application that has been working perfectly in English for over a year. We have now localized it to French and Spanish, and discovered a serious show-stopping problem. We need help fast, with the scheduled release being less than 2 weeks away...!
We iterate over a folder to find all the images in it, then display those in a user window. The code for loading the images is:
for each (var name:String in filenames){
var image:SmoothImageTransformable = new SmoothImageTransformable();
var imagePath:String = dir + "/" + name;
image.source = imagePath;
trace("Adding Item to picture carousel with url " + image.source);
image.data = {directory:dir, filename:name};
image.isDragEnabled = true;
image.setStyle("horizontalCenter", 0);
image.setStyle("verticalCenter", 0);
_images.push(image);
Our SmoothImageTransformable class is an internal class that inherits from Image. This all works fine for image names like 'myFavoritePhoto', 'test', 'photo346', etc. However, it fails to load the data if the file name is something like 'caméra' Any name with a UTF-8 character causes the data load to fail.
To be sure we weren't doing a load somewhere else in the code that I had overlooked, I added a "image.autoLoad = false' line in there. That did exactly as expected -- all image squares then show a grey blank, with no image shown. Removing that line (reverting to the original code, as shown above) causes all the images to work perfectly, except for those with French accent characters like the é.
HELP! Is this a known bug? Is there some additional setting I need to make it understand the extended character set? I can't find any mention about this at all in the documentation.@markerline:
We have a fix! Almost... I don't understand one aspect of what I am seeing though.
We have one test file named "camèra.jpg" that is an example of what I am unable to load into an Image. I decided to examine the character codes at each letter, and this is what Flex has as the string:
name = cam?ra.jpg
[0] = c; 0x99
[1] = a; 0x97
[2] = m; 0x109
[3] = ?; 0x232
[4] = r; 0x114
[5] = a; 0x97
[6] = .; 0x46
[7] = j; 0x106
[8] = p; 0x112
[9] = g; 0x103
Note that the è prints as gibberish in the trace statement, and shows a numeric encoding of 0x232. According to
http://docstore.mik.ua/orelly/web2/action/appb_01.htm
The unicode equivalent of Latin1 for è is 0xE8, which is equivalent to 0x232. That implies that the string is already Latin1, which I would think would mean that Windoze would recognize the file name and open it properly -- but it does not.
I then tried taking the "camèra.jpg" string, pasting it into NotePad++ in a UTF8 document, then telling NotePad++ to display as ASCII. The result is "camèra". I then tried just forcing the file name within Flex to this new mangled string. The result then is:
MAGIC name = camèra
[0] = c; 0x99
[1] = a; 0x97
[2] = m; 0x109
[3] = ?; 0x195
[4] = ?; 0x168
[5] = r; 0x114
[6] = a; 0x97
[7] = .; 0x46
[8] = j; 0x106
[9] = p; 0x112
[10] = g; 0x103
Note this time the trace statement looks proper. More important, the IMAGE DOES LOAD! (Our display of the name to the user now looks like crap, but that just means I need to modify our class to have a separate 'name' property, rather than extracting it from the 'image.source')
So... my remaining question -- what encoding did I just do through that NotePad++ incantation? That site I quoted above said that it was already Latin1, which is what I thought I was trying to get to. I clearly need to write a method to map from incoming (UTF8 I thought, but maybe Latin1?) to Windows file system (Latin1 I thought, but maybe ASCII).
In other words, I am not sure what charcter set to come from or go to... It turns out the code was already in the character set I had been trying to go to (which is why it wasn't working) and the set I seem to need to go to is not the one I thought... -
Help: Problem Inserting CLOB-data with ODBC
Hello,
I have searched this forum for my problem and found only one similar message, unfortunately without reply. I hope there are some wizards present here today who can help me.
I use Perl and the ODBC driver for 8i (v8.1.5., WinNT) to insert and query data from a tabel with a CLOB. Queries go fine (although you have to increase the buffer size within Perl, but I have a problem to insert values into CLOBS.
I get the message ORA-1704 shown below. Oracle/ODBC seems to think that i want to insert into a VARCHAR2(4000) instead of
a CLOB.
I have included my Perl test-script as well.
Any suggestions are very welcome,
Bart
Error-message:
ORA-01704 string literal too long
Cause: The string literal is longer than 4000 characters.
Action: Use a string literal of at most 4000 characters. Longer values
may only be entered using bind variables.
PERL test-script:
#!perl
# USAGE
# perl clobtest size [bufsize]
# Creates a string of approximately size*1000 bytes, consisting of a line with 'A',
# followed by lines of at most 100 'o's, followed by a line with 'Z'.
# bufsize is optional, if given, specifies the size of the ODBC buffer.
# Default value is 10240
# The string is loaded into a table field, then read from that field, and saved in
# a file. The entire table is deleted on beforehand! so that there is only one
# record in that table. If there are errors, error number and text are displayed on
# the console.
# See the globals below for username, password, host, table end column.
use strict;
use FileHandle;
use Win32::ODBC;
# GLOBALS
# DATABASE
my $ADMIN ='xpa';
my $PWD ='manager';
my $DBMC ='PO8i';
my $table = 'TEST';
my $column = 'OMSCHRIJVING';
my $amount = $ARGV[0];
my $newbufsize = $ARGV[1];
my $bulk;
sub connect_db {
if (!$newbufsize) {
$newbufsize = 10240;
print "Connecting as... $ADMIN to $DBMC\n";
my $dbh = new Win32::ODBC("dsn=$DBMC;UID=$ADMIN;PWD=$PWD");
if (!$dbh) {
print "Hm\n";
die qq(Cannot open ODBC\n);
$dbh->SetMaxBufSize($newbufsize);
my $bufsize = $dbh->GetMaxBufSize();
print "Bufsize = $bufsize\n";
return $dbh;
sub createbulk {
$bulk = "A";
my $bytes = 1000 * $amount;
my $i;
for ($i=0; $i<$bytes-4; $i++) {
if ($i % 100 == 0) {
$bulk .= "\n";
else {
$bulk .= "o";
$bulk .= "\nZ\n";
my $dbh = connect_db();
createbulk();
print "Deleting $table\n";
$dbh->Sql("delete from $table");
print "Inserting into $table -> $column\n";
my $fail = $dbh->Sql("insert into $table ($column) VALUES (\'$bulk\')");
if ($fail) {
print "$dbh->{ErrNum}: $dbh->{ErrText}\n";
exit;
print "Querying from $table -> $column\n";
$fail = $dbh->Sql("select OMSCHRIJVING from TEST");
if ($fail) {
print "$dbh->{ErrNum}: $dbh->{ErrText}\n";
exit;
my @result = ();
while (defined $dbh->FetchRow()) {
my $result = $dbh->Data();
push @result, $result;
print "Writing query result to file \"cltst$amount\"\n";
open TST, ">cltst$amount";
for my $line (@result) {
print TST $line;
close TST;Hi,
We can't directly insert into a column
which is a clob datatype.To insert data into
the CLOB datatype column we have to write
some PL/SQL progam using the package DBMS_LOB
in oracle.
Read Oracle documentation for more information on DBMS_LOB package.
Hope this will help u.
NEDU.
null
Maybe you are looking for
-
How can I get Adobe connect to work with 10.7.5?
When I do an Adobe connect using my MacBookPro running 10.7.5, the person on the other end does not get anything visible, except a moving cursor. Ever since I upgraded to 10.7.5, my Adobe Connect does not work correctly. Any suggestions? Thanks!
-
Getting error while loading assets using API
The error is as follows. l_error:Error: function fa_cache_pkg.fazcbc returned failure l_error:Error: function fa_addition_pub.do_addition returned failure Can anyone please let me know if you have solution
-
Hi-don't know what happened but when I bring up the Print window, I no longer have the option button to Save as PDF, Mail PDF, etc. The only button in that area is the Supplies button. I did an erase and install a few weeks ago and installed all upda
-
Podcasts are without video after iTunes 702 update !!
After updating to iTunes 702, my previously downloaded podcasts are not viewing any video, just the audio. Anyone has the same problem ??
-
I am making a GUI for a little software game. But i have a problem with my slider. I want to change the selection color from the tumb from the standard "beautiful" purple to another color. I've tried following settings , with UIManager.put("Slider.ba