On the last statement below, I am getting this error -
'System.Invalid CastException'
Does anyone know what is causing this? I am trying to pass a parameter to a
stored procedure in an iseries. My connection opens and I can call a stored
procedure with no parameters. The problem is that I cannot pass any
parameters.
'create command object
Dim cmd As New iDB2Command(sql , cn
Dim cmdparm1 As New OleDb.OleDbPara meter("QRYNAME" , OleDb.OleDbType .Char,
10)
cmd.Parameters. Clear()
cmdparm1.Value = "SUNTR401A"
cmdparm1.Direct ion = ParameterDirect ion.InputOutput
cmd.Parameters. Add(cmdparm1)
Thanks in advance,
Joe in Florida
'System.Invalid CastException'
Does anyone know what is causing this? I am trying to pass a parameter to a
stored procedure in an iseries. My connection opens and I can call a stored
procedure with no parameters. The problem is that I cannot pass any
parameters.
'create command object
Dim cmd As New iDB2Command(sql , cn
Dim cmdparm1 As New OleDb.OleDbPara meter("QRYNAME" , OleDb.OleDbType .Char,
10)
cmd.Parameters. Clear()
cmdparm1.Value = "SUNTR401A"
cmdparm1.Direct ion = ParameterDirect ion.InputOutput
cmd.Parameters. Add(cmdparm1)
Thanks in advance,
Joe in Florida
Comment