-
-
Save AlexLaforge/0996c1db637cb33d4a6d54773bb04eb9 to your computer and use it in GitHub Desktop.
Convert value by recordset value type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function typeValue(value) | |
select case TypeName(value) | |
case "Byte": typeValue = cBool(value) | |
case "Integer": typeValue = cInt(value) | |
case "Long": typeValue = cLng(value) | |
case "Single": typeValue = cDbl(value) | |
case "Double": typeValue = cDbl(value) | |
case "Currency": typeValue = cDbl(value) | |
case "Decimal": typeValue = cDbl(value) | |
case "Date": typeValue = cDate(value) | |
case "Boolean": typeValue = cBool(value) | |
case "String": typeValue = cStr(value) | |
case else: typeValue = cStr(value) | |
end select | |
end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment