Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ODAC Error 01008: not all variables bound when using a Procedure to update table

User_VGARVFeb 1 2017 — edited Feb 2 2017

Simple procedure to update Employee Note:

[code]

create or replace procedure testq (p_empiid number,p_empnote varchar2)

is

begin

         update l_employees set empnote=p_empnote where empiid= p_empiid;

end;

[/code]

This works fine when running from SQL Developer or SqlPlus. However, in VB.NET I get the "01008: not all variables bound" error

[code]

Try

            Dim conn As New OracleConnection

            Dim cmd As New OracleCommand

            conn.ConnectionString = myconn

            cmd.Connection = conn

            cmd.CommandType = CommandType.StoredProcedure

            cmd.CommandText = "TESTq (:pempiid,:pempnote)"

            cmd.Parameters.Add("pempiid", 1)

            cmd.Parameters.Add("pempnote", "a1a")

            conn.Open()

            cmd.ExecuteNonQuery()

            conn.Dispose()

        Catch ex As Exception

            MsgBox(ex.ToString)

        End Try

[/code]

Anyone have any ideas for me? I have tried writing the Parameters 10 different ways along with the Command Text.

I tried changing the SP to just run an update with the values stored in the SP - and it worked fine - The table updated. Basically CommandText = "TESTQ" with no variables.

A Select using Variables seems to work fine - only when its a Stored Procedure in Oracle.

As soon as I introduce variables, I get the error.

Any ideaS?

This post has been answered by svenkatn-Oracle on Feb 2 2017
Jump to Answer

Comments

Greijus-Oracle
Answer

I think you should be looking at the Memory page instead. You can select an area in the chart, where a GC of interest is happening, right-click that and choose "Store and Set As Focused Selection". That way, in the table above the chart, you will be able to see the allocations made during that time. Selecting one (or more) of those classes will then show you the stack trace(s) for the allocations.

Hope this helps.

/Erik

Marked as Answer by sam.bishop · Sep 27 2020
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 2 2017
Added on Feb 1 2017
2 comments
6,867 views