Mega Code Archive

 
Categories / Delphi / ADO Database
 

Oracle integer to bde or delphi float, enable integer

Question: I've created an Oracle table using the INTEGER type but the BDE shows the INTEGER field as a FLOAT even though I have ENABLE INTEGERS set to True. Answer: The Oracle server will set the fields precision to '*' and the scale to '0' (MYFIELD(*,0) for example) when a field is created as INTEGER. This translates to an Oracle precision of 38. The maximum precision for Oracle NUMBERs INTEGERS and SMALLINTS is 38. The maximum precision for Delphi/BDE INTEGERs is 10 (-2,147,483,648 to 2,147,483,647 or 9,999,999,999).