R
Rob Richardson
Greetings!
I am trying to figure out the easiest way to set up parameters for an insert
query. There are lots of overloads for the OleDbCommand.Parameters.Add()
method and lots more of them for the OleDbParameter constructor, and I'm
suffering from overload overload. I will be adding simple data types:
strings, currency values, and integers. Is a two-step process best?
dim newParameter as OleDbParameter = myCommand.Parameters.Add("ParamName",
OleDbtype.Char)
newParameter.Value = "ValueIWantInMyDatabase"
What parameters of the OleDbParameter structure do I need to fill in, and
what will be filled in for me? Do I need to fill in the size for string
parameters, even though VB should know what the size is? Do I need to fill
in scale and precision for integer or currency parameters?
Thanks!
Rob
I am trying to figure out the easiest way to set up parameters for an insert
query. There are lots of overloads for the OleDbCommand.Parameters.Add()
method and lots more of them for the OleDbParameter constructor, and I'm
suffering from overload overload. I will be adding simple data types:
strings, currency values, and integers. Is a two-step process best?
dim newParameter as OleDbParameter = myCommand.Parameters.Add("ParamName",
OleDbtype.Char)
newParameter.Value = "ValueIWantInMyDatabase"
What parameters of the OleDbParameter structure do I need to fill in, and
what will be filled in for me? Do I need to fill in the size for string
parameters, even though VB should know what the size is? Do I need to fill
in scale and precision for integer or currency parameters?
Thanks!
Rob