Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Workbench
Viewing all articles
Browse latest Browse all 69588

Insert date into database by using JDBC Service/Execute SQL statement in workbench

$
0
0

Hello,

 

Can any one please advise on the formatting the date so it can be inserted into the database without getting error.

 

insert into tableA(fieldA, fieldB, dateC)

values (?, ?, ?)

 

or

 

insert into tableA(fieldA, fieldB, dateC)

values ('?', '?', '?')

 

I tried either insert statements above for SQL server but keep getting the below error:

 

[4/22/13 13:39:43:444 CDT] 0000002e ExceptionUtil E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "doBMT" on bean "BeanId(LiveCycle8#adobe-dscf.jar#EjbTransactionBMTAdapter, null)". Exception data: java.lang.RuntimeException: Conversion failed when converting date and/or time from character string.

 

 

But if I manually place the value like the below then it works fine.

insert into tableA(fieldA, fieldB, dateC)

values ('test', 'description', '4/22/2013')

 

Thanks,

HD


Viewing all articles
Browse latest Browse all 69588

Trending Articles