473,465 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
0 1427

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Prabhakar Chola | last post by:
I got this error on production and I rebooted the server and the problem went away. It happens at random. Please help. Environment W2K with Oracle 9.2 client connected to oracle using...
1
by: N S S | last post by:
I Get the following Error ================ Error =============================== Procedure 'GetCetgoriesOrProducts' expects parameter '@CategoryID', which was not supplied. Description: An...
0
by: silesius | last post by:
I've been using VS 2003 to develop a webapplication using C#. Today I exported the application to a remote webserver I begun experiencing problems. It's a simple application that retrieves some...
1
by: Brian Henry | last post by:
I have an access database, and one of the fields in the table I am inserting into has a date/time data type. What is the correct OleDb data type to insert the date and time that it is at the moment...
1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
0
by: silesius | last post by:
I've been using VS.NET 2003 to develop a webapplication using C#. Today I exported the application to another webserver I begun experiencing problems. It's a simple application that retrieves...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
4
by: SAL | last post by:
Hello, I am using OLEDB to access Excel, and what I have read you can access Named Ranges but I am having trouble doing so. The following are lines of code I've tried in my C# program to access...
0
by: funky4you | last post by:
I am using a simple select query in C# app that fetches a row which has a datatime field. The query is simple "SELECT * FROM THE USERS WHERE USER_NAME = 'ABC' ", the users table contains a...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.