1. You have to Commit (or Rollback) transaction before you close the
connection.
2. It is impossible to find the reason without seeing some code.
"Luis Rivas via .NET 247" <anonymous@dotnet247.com> wrote in message
news:egeoa64aFHA.1600@tk2msftngp13.phx.gbl...
> Hi All,
>
> I'm trying to work with stored procedure in VB.NET but there were some
> problems with that, I hope someone can help me.
> First, is there a way to manage a stored procedure's transaction from
> VB.NET?, I tried something like this (see code below) but when I do commit
> an error appears because the transaction is already closed.
>
> ...............
> Dim objConexion As New OleDbConnection(strConexion)
> Dim trans As OleDbTransaction
> Dim objComando As OleDbCommand = New OleDbCommand("fun_codigos",
> objConexion)
> objComando.CommandType = CommandType.StoredProcedure
>
> ......defining parameters...............
>
> objConexion.Open()
> trans = objConexion.BeginTransaction
> objComando.Transaction = trans
> Dim objDataReader As OleDbDataReader = objComando.ExecuteReader
> objDataReader.Close()
> objConexion.Close()
>
> Dim salida As Int64
> salida = objComando.Parameters("@p_cod_servicio").Value
> Label1.Text = salida
> trans.Commit() -------> here an error appears!
>
> I have to manage the transaction from VB.Net not from inside the stored
> procedure.
>
> Second, I want to pass some parameters from VB.NET to an stored procedure
> but there is an error like this: "ORA-06550: line 1, column 18: PLS-00382:
> expression is of wrong type ORA-06550: line 1, column 7: PL/SQL: Statement
> ignored "
> I checked parameter's type in VB.NET and there were the same as in stored
> procedure.
>
> I'm working with Oracle 8i.
>
> I hope you can help me.
>
> Thanks in advance
>
> --------------------------------
> From: Luis Rivas
>
> -----------------------
> Posted by a user from .NET 247 (
http://www.dotnet247.com/)
>
> <Id>AoJVv0qDtEujWhQCf0pbeA==</Id>