As part of my learning activities I am trying to learn how to call stored
procs from my VB app and pass paramters to the stored proc.

I have a form with two fields and the following VB code (fragment):

Set param = New ADODB.Parameter
param.Name = "ComponentID"
param.Type = adInteger
param.Value = txtcomponentID.Text
param.Direction = adParamInput
cmd.Parameters.Append param

Set param = New ADODB.Parameter
param.Name = "ComponentID2"
param.Type = adInteger
param.Value = txtComponentDesc.Text
param.Direction = adParamInput
cmd.Parameters.Append param

Both parameters are type adInteger. The stored procedure expects two integers
and then inserts them into a table. I put a number into both fields on the
form and this works fine.

If I change the second param to type adchar, input a number in the first
field and a letter in the second field of the form (and modify the stored
procedure to expect an int and a char) I get the following error:

Run-time error 3708
Parameter object is improperly defined. Inconsistent or incomplete information
was provided.

I don't understand why I can pass two int's but not an int and a char. I
also get the same error if I change both to char's. I can only pass two
int's!