db resource - number or numeric.

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

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

db resource - number or numeric.

#1

Postby xren » Fri May 20, 2016 5:19 pm

Hi,

I have columns with number as the data type in my oracle database,

when I create db resource for this table and using import, the fields imported are all integer instead of number. How can these be fixed?

If I manually change the fields type for the Db resource, should I pick number or numeric? what are the differences?

Thanks,
Xiaoli
0 x

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

#2

Postby Jon » Fri May 20, 2016 5:47 pm

If the Oracle columns specify 0 decimal places, INTEGER is the correct type. If they have decimal places you should use the DECIMAL type for the resource fields.

At runtime, it doesn't matter too much which type is specified in the Database Resource fields, but it does matter what type is specified for the mapped form fields. The form fields should be either INTEGER or NUMERIC depending on whether decimal places are allowed or not.
0 x


Who is online

Users browsing this forum: No registered users and 19 guests