Last active
February 28, 2020 22:20
-
-
Save marcelodeandrade/b0ef1ecde432354b92d00b28602302dc 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