J
Jim Heavey
I am writing a "generic" routine which will return to the "calling"
procedure a list of all of the parameters and the parameter types. The
intent is the calling program will read the "Parm names and Types" and
build a HashTable of the values which will then be passed back to
actually build those parameters.
I do not what to return a "sqlDBType", but I would rather return some
generic type which can be handled by the calling program in the event
that I would change from SQL Server to something else.
I am trying to map the SQLDBTypes to a "universal" or a System.? (e.g
Byte, String, ect.)
Below is my Guesses as to how things will mapp out. I will ultimately
create the parm with the appropriate SQLDBType and will do the
appropriate conversions as necessary.
Am I assigning the right types? Is there a better way to do this?
BigInt Int ???
Binary Byte() ??
Bit Char ??
Char String
DateTime DateAndTime
DecimalFloat Float
Image Byte() ??
Int Integer
Money Double
NChar String
NText String
NVarChar String
Real Double ????
SmallDateTime DateAndTime
SmallInt int16
SmallMoney double
Text string
Timestamp DateAndTime ???
TinyInt int16
UniqueIdentifier ????
VarBinary Byte() ??
VarChar string
Variant object ????
procedure a list of all of the parameters and the parameter types. The
intent is the calling program will read the "Parm names and Types" and
build a HashTable of the values which will then be passed back to
actually build those parameters.
I do not what to return a "sqlDBType", but I would rather return some
generic type which can be handled by the calling program in the event
that I would change from SQL Server to something else.
I am trying to map the SQLDBTypes to a "universal" or a System.? (e.g
Byte, String, ect.)
Below is my Guesses as to how things will mapp out. I will ultimately
create the parm with the appropriate SQLDBType and will do the
appropriate conversions as necessary.
Am I assigning the right types? Is there a better way to do this?
BigInt Int ???
Binary Byte() ??
Bit Char ??
Char String
DateTime DateAndTime
DecimalFloat Float
Image Byte() ??
Int Integer
Money Double
NChar String
NText String
NVarChar String
Real Double ????
SmallDateTime DateAndTime
SmallInt int16
SmallMoney double
Text string
Timestamp DateAndTime ???
TinyInt int16
UniqueIdentifier ????
VarBinary Byte() ??
VarChar string
Variant object ????