Hello Friends,
Iam creating a simple program which extracts data from any database and stores it in an XML file and also it can extract data from an XML file and updates the database.
My program is just getting the tablename as an input and from that it builds the query (select * from tablename). Through ResultSet, Iam extracting date fields with getDate() method of ResultSet, which is yeilding converted dates [In oracle if date is 23-DEC-1980, Im getting it as 1980-12-23 in
java]. Even getString() method of ResultSet doesn't work.
I want my program to work with any database engine, which may have their own date formats. Kindly can anyone suggest me a way to extract date from any database exactly as it is in java.
NOTE:: I can't use to_char(datefield) type commands in SQLQUERY as the only input to my program is tablename and my query is, select * from tablename.
Regards,
Ch.Praveen.