Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_DbSchema_ColumnDatabase Schema Column Information

Public Function FormatColValueSimple (
ColumnVal As Variant ,
Optional CheckForQuotedStrings As Boolean = False ,
Optional OverrideSQLColumnFormat As xf_SQLColumnFormatEnum = xf_SQLColumnFormat_Unsupported
) As String

Format the column value based on this column's schema, but just do type checking , not null and length checking etc.
Assumes that strings are not quoted prior to passing in.

ColumnVal as Variant

The variant column value

Optional CheckForQuotedStrings as Boolean = False

Check for quoted string, and unquote and requote if detected (this will corrrect invalid escaping as a side effect)

Optional OverrideSQLColumnFormat as xf_SQLColumnFormatEnum = xf_SQLColumnFormat_Unsupported

Override the schema xf_SQLColumnFormatEnum with this one

Call Template:

Dim s As String
s = xf.DefaultSchema.TableSchema("tblSample").Columns.FormatColValueSimple(ColumnVal)
s = xf.DefaultSchema.TableSchema("tblSample").Columns.FormatColValueSimple(ColumnVal, CheckForQuotedStrings, OverrideSQLColumnFormat)

See Also:

Example 1:

Dim objSchema As New xf_DbSchema
objSchema.Init xf_SQLDatabaseType_MSAccess, False, xf.DbConnect, "Default DB"
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd