Skip to Content
0

Change from native Oracle 9.2 to JDBC changes date format causing invalid column name error

Apr 17, 2017 at 09:15 PM

49

avatar image
Former Member

Hi,

We are using CR2008 with Oracle client 9.2 and we can export reports just fine. Upon changing the connection to JDBC, we get an invalid column name error- ora-00904 - I have tracked this down by checking the SQL statement of the subreport that receives a date parameter. When using the native driver, the subreport's SQL format for a date looks like this: "....LASTSAVEDDATETIME"<TO_DATE ('04-20-2017 16:05:49', 'DD-MM-YYYY HH24:MI:SS')" . But when I switch the connection to JDBC the subreport's SQL date format changes to a timestamp format that Oracle errors on : " ....LASTSAVEDDATETIME"<{ts '2017-04-20 16:05:49'} "

Also, when I first setup the JDBC connection I added the ojdbc14.jar to the Crystal Report xml config file - I could not configure the JDBC connection until I did that.

We want to use the JRC to export these reports in an automated fashion from a Java application. We have that function basically working except when a date is passed to a subreport which happens a lot.

So my question is how do I prevent the incompatable date format when using JDBC?

Thanks,

Jim

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers