Retrieving Date Column from SQL and Displaying

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

tom.smith
Ebase User
Posts: 24
Joined: Thu May 09, 2013 2:54 pm

Retrieving Date Column from SQL and Displaying

#1

Postby tom.smith » Fri May 23, 2014 2:41 pm

OK, so this should be easy.

I have a date field within a MS SQL database.
I have a DB resource in ebase which selects all columns from the table.
The type for the date column is set to "Date".
I have a table on my ebase form, which is mapped to the DB resource.
I have a column within my ebase table which is mapped to the date field from the DB resource, and that is set to type "Date".

When I issue a fetchtable command, I get the following error:

Code: Select all

com.ebasetech.xi.exceptions.FormRuntimeException: Unable to set value for field ALERTS_TBL-REGISTRATIONDATE, value 2014-05-23 not compatible with type DATE

I can issue an updatetable command without any issues at all. Date gets entered into the MS SQL DB without any issues.

Any ideas?

Thanks

Tom
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#2

Postby Steve James » Fri May 23, 2014 4:31 pm

Hi Tom

Looks like MSS is returning a date in a format not acceptable for Ebase see acceptable formats http://portal.ebasetech.com/cp/doc/UFS_ ... c369594441

Thanks
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#3

Postby Jon » Tue May 27, 2014 8:44 am

Could be that you're using the DATE type introduced with SQL Server 2008, which is not supported by the jtds JDBC driver supplied with Ebase. The simplest solution is to change the type to one supported by the driver i.e. datetime. For info, here's a link to the supported jtds column types: http://jtds.sourceforge.net/typemap.html
0 x

tom.smith
Ebase User
Posts: 24
Joined: Thu May 09, 2013 2:54 pm

#4

Postby tom.smith » Tue May 27, 2014 1:14 pm

Thanks for the info guys
0 x


Who is online

Users browsing this forum: No registered users and 20 guests