467,180 Members | 1,174 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,180 developers. It's quick & easy.

asp.net oledb command parameter error calling an as400 program

asp.net oledb command parameter error calling an as400 program
Hi...

I have an as400 program that I can call it directly and it works:

variable= "xxxx"
sql = "CALL METSIGOP.SIGOPRC ('" + variable + "')"
Dim con As OleDbConnection
Dim cmd As OleDbCommand
con = New OleDbConnection()
cmd = New OleDbCommand()
con.ConnectionString = StrCon
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
con.Open()
Try

cmd.ExecuteNonQuery()

No errors, it works fine.

The program I call, uses a inputouput parameter, so we would like to
check the variable return:
Dim con As OleDbConnection
Dim cmd As OleDbCommand
con = New OleDbConnection()
cmd = New OleDbCommand()
con.ConnectionString = StrCon
cmd.Connection = con
cmd.CommandType = CommandType.Text
cmd.CommandText = "CALL METSIGOP.SIGOPRC (?)" '
Dim parametro As New OleDbParameter("XURRO",
OleDb.OleDbType.Char, 128)
parametro.Value = "xxxxx"
parametro.Direction = ParameterDirection.InputOutput
cmd.Parameters.Add(parametro)
con.Open()

Try

cmd.ExecuteNonQuery() <=== now I get an error:

SQL: CALL METSIGOP.SIGOPRC ('xxxxx')
Mensaje: SQL0204: SIGOPRC in METSIGOP of type *N not found.
Origen: IBMDA400 Command
SQLState:

Does anyone have any idea about what i am doing wrong ?...
Thanks in adavance... have a nice day..
Miguel Canals (Barcelona, Spain)
Nov 18 '05 #1
  • viewed: 1182
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Prabhakar Chola | last post: by
1 post views Thread by N S S | last post: by
1 post views Thread by Brian Henry | last post: by
4 posts views Thread by SAL | last post: by
reply views Thread by funky4you | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.