Hi Oleg, can you please tell how you have created 'myTable' (in INTERNAL or in ORACLE mode, and which type that column has).
I fear you created it in INTERNAL mode (where a DATE is a DATE), and used it in ORACLE mode (where a DATE is a TIMESTAMP, just like in Oracle). Regards Alexander Schr�der SAP Labs Berlin > -----Original Message----- > From: Oleg V. Nastyushkin [mailto:[EMAIL PROTECTED] > Sent: Monday, October 14, 2002 2:22 PM > To: Sap DB > Subject: Date field problem in Java > > > Hi, > I`m try to load data from Interbase to Sap DB. > My java code: > ---------- > //jdbc:sapdb://myHost/myDb?unicode=yes&sqlmode=ORACLE&timeout=0 > > ... > java.sql.Statement stmtSpr = InterbaseDB.createStatement(); > ResultSet rsetSpr = stmtSpr.executeQuery( > "select DATEfield from myTable "); > > PreparedStatement stmtIns = sapDB.createPreparedStatement( > "insert into myTable (DATEfield) values (?) "); > > while(rsetSpr.next() ) { > stmtIns.setDate( 1, rsetSpr.getDate("DATEfield")); > stmtIns.execute(); > } > stmtSpr.close(); > stmtIns.close(); > sapDB.executeStatement("commit"); > ----------- > All fine. In my Application Borland`s dataset show mi dates. > But then I`m try to create select statment like this: > > select * from myTable > where DATEfield <= to_date ('01.01.2003' , 'dd.mm.yyyy') > > And catch exception: > [-8006](at 60): Data types must be compatible > ! > > In SQL Studio : > Error text: Integrity constraint violation;-8006 POS(37) Data > types must > be compatible. > > Then look at data: > select * from myTable > and see in my DATEfield this: > > [SAP AG][SQLOD32 DLL]Datetime field overflow. > > What can i do? > > Thanks. > > Oleg > > > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
