Tom, The following from "Programming in RBase" might help: 2.3 Variable Data Types 2.3.1 Implicit Data Typing In addition to defining a variable value, the SET VARIABLE command is used to establish the data type of a variable. Quite often the data type is implied by the variable contents. R:BASE uses the following rules in the order listed to determine the implicit data type of a variable. · A TEXT data type results if the variable has more than 30 characters or has zero characters (null variable). · An INTEGER data type results if a variable value is a non-decimal number and has nine or less digits. · A DOUBLE data type results if the variable value is numeric with 15 or less digits and one of the following: · The variable value contains a decimal point · The variable value is a decimal point (interpreted as 0.0) · The variable value is in scientific notation using a decimal point (for example, 1.0E6) · A DATE data type results if the variable value matches the current date input format and contains a valid date value. · A TIME data type results if the variable value matches the current time input format and contains a valid time value. · A DATETIME data type results if the variable value matches the current date/time input format and contains a valid date / time value. · A CURRENCY data type results if either of the following is true: · The variable value contains the current currency symbol followed by numerals · The value is 10 to 17 numeric places · A TEXT data type results if the variable value cannot be assigned any other data type based on the above rules. 2.3.2 Explicit Data Typing Some variable definitions may not be obvious from the value assigned. You might, for example, use the following SET VARIABLE command. SET VARIABLE var4 = 100.50 This value could represent a real number, a double-precision number, a currency figure, or a text string. In cases like this, R:BASE has difficulty determining the type of variable you are defining. It is safest, therefore, to preset the data type of a variable whose type may be in question. You cannot assign data types to parameter variables. To explicitly set a variable data type, use the SET VARIABLE command in the following form before defining the variable value: SET VARIABLE var4 CURRENCY
Jim Bentley American Celiac Society [EMAIL PROTECTED] tel: 1-504-737-3293 ----- Original Message ---- From: TOM HART <[EMAIL PROTECTED]> To: RBASE-L Mailing List <[email protected]> Sent: Wednesday, October 15, 2008 3:53:11 PM Subject: [RBASE-L] - Passing a variable I have a form that my employees use to clock in and out, and has worked like a charm for over a year. We us the last 4 digits as employee id for them to clock in, and until now never had an employee with a leading 0, example 0123. the field is defined as a text. I use the variable as default value for column EmpID but the variable does not pass the leading 0, example only 123. What I did was used a property command the set the EmpID and all works fine, but my question is why does the variable not pass through to the default value as 0123 but instead 123. Tom Hart

