For some reason i have to use oledb.net, however the code from vb.net always not work:
this is the stored procedure:
create or replace PROCEDURE STP_XMLSIMPLE1
(txt_in IN varchar2,
status_message OUT VARCHAR2
)
AS
BEGIN
status_message:='This is the text:'|| txt_in;
END;
And this is the VB.net code:
Dim dbConn As New OleDbConnection
Dim dbComm As OleDbCommand
'dbConn.ConnectionString = "Provider=OraOLEDB.Oracle;User ID=jehan;Password=bobobo;Data Source=rac10u1;"
dbConn.ConnectionString = "Provider=MSDAORA;User ID=jehan;Password=bobobo;Data Source=rac10u1;OLEDB.NET=true"
dbConn.Open()
dbComm = dbConn.CreateCommand
dbComm.Parameters.Add("txt_in", OleDbType.VarChar, 100).Direction = ParameterDirection.Input
dbComm.Parameters.Add("status_message", OleDbType.VarChar, 500).Direction = ParameterDirection.Output
dbComm.Parameters("txt_in").Value = "jeff test"
dbComm.CommandText = "{STP_XMLSIMPLE1(?,?)}"
dbComm.CommandType = CommandType.Text
dbComm.ExecuteNonQuery()
MessageBox.Show(dbComm.Parameters("status_message").Value)
dbConn.Close()
i've tried two providers as you can see. But this code always got failure and the error shows on "dbComm.ExecuteNonQuery()".
Thanks for any help!