Reading & Writing to a db with unknown date type

Questions and answers regarding general SQL and backend databases

Reading & Writing to a db with unknown date type

Postby Chuck.Amata » Tue May 22, 2018 7:05 pm

We have an existing Pervasive dB where date fields are saved as "YYYY-MM-DD" length 10. In Servoy 7, the data type comes up as UNKNOWN TYPE#9 with length 10 in the column screen for the table. The data screen shows the data in the field as YYYY-MM-DD. If we connect one of these date data providers to a form field set to type CALENDAR, the data appears correctly on the form as MM/DD/YY. However, if we attempt to edit the field, the application crashes with an "internal error" as soon as Servoy tries to write back the updated value to the table. Since we cannot change the date type or format in the database (it is used by another application), and Servoy seems to know how to properly convert the field for display on the form, is there a way to have Servoy convert the date generated by the CALENDAR field type back into the correct date format for the database (e.g. YYYY-MM-DD") when it attempts to write the information back to the database?
Chuck.Amata
 
Posts: 50
Joined: Sun Oct 04, 2009 8:02 pm
Location: USA

Re: Reading & Writing to a db with unknown date type

Postby Chuck.Amata » Wed May 23, 2018 4:29 pm

Update:
It looks like a UI converter might handle this read write problem. The is a check box [ ] that can be selected in the format element for a field that will allow a UI converter method to be selected. However, when set up two methods in globals.js, they never show up in the format UI Converter combo box. If anyone can tell us how to set up the UI functions so they can be selected, it would be appreciated.
Chuck.Amata
 
Posts: 50
Joined: Sun Oct 04, 2009 8:02 pm
Location: USA


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 3 guests