I am working on a class that will hopefully reduce my coding by dynamically building command objects and returning data tables.
I am stuck on the parameter type. I have stored proc that will retrieve a list of the parameters, their type, and lenght. the type is the text vaule (char, varchar, int, bit, datetime). I want to convert that value to the sqldbtype in vb.net to create the parameter collection for the sp.
The following is erroring out
[tt]While Reader.Read
GetParameters.Add(Reader.Item("Parameter"
, CType(Reader.Item("DataType"
, SqlDbType), Reader.Item("Length"
)
End While[/tt]
I've thought of making a function of case statements that will return the sqldbtype, but that seems clunky. Is there a better way?
thanks for your help
Jason Meckley
Database Analyst
WITF
I am stuck on the parameter type. I have stored proc that will retrieve a list of the parameters, their type, and lenght. the type is the text vaule (char, varchar, int, bit, datetime). I want to convert that value to the sqldbtype in vb.net to create the parameter collection for the sp.
The following is erroring out
[tt]While Reader.Read
GetParameters.Add(Reader.Item("Parameter"
End While[/tt]
I've thought of making a function of case statements that will return the sqldbtype, but that seems clunky. Is there a better way?
thanks for your help
Jason Meckley
Database Analyst
WITF