Skip to Main Content

ODP.NET

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!

The infamous ""ORA-01036: illegal variable name/number"

390104Jun 3 2005 — edited Jun 7 2005
I know I'm getting some kind of parameter error, but I've been beating my head against the wall trying different things for it to work and can't.....

My select statements work fine, but my update statements are failing...

I'll just give you the DELETE statement that is failing. My programming code is as follows:
<code>

Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click

Try

OracleDataAdapter1.DeleteCommand.CommandText = "USERTEST3.DELETE_USER"

OracleDataAdapter1.DeleteCommand.Connection = Me.OracleConnection2

OracleDataAdapter1.DeleteCommand.Parameters.Add("USERID", New Oracle.DataAccess.Client.OracleParameter)

OracleDataAdapter1.DeleteCommand.Parameters.Item(0).OracleType = Oracle.DataAccess.Client.OracleDbType.Long

OracleDataAdapter1.DeleteCommand.Parameters.Item(0).Value = Convert.ToInt64(txtUserID.Text)

OracleDataAdapter1.DeleteCommand.Connection.Open()

OracleDataAdapter1.DeleteCommand.ExecuteNonQuery()

Catch ex As Exception

MessageBox.Show(ex.Message())

End Try

End Sub


</code>

While debugging, I've verified the following:
The Connection is open.
I do have 1 parameter whose name is "USERID" with a value of 1.

Here is my PL/SQL package spec & body:
<CODE>

PACKAGE "POSV201TEMPLATE"."USERTEST3" AUTHID CURRENT_USER IS
PROCEDURE "DELETE_USER" (
"USERID" IN LONG);

END "USERTEST3";


PACKAGE BODY "POSV201TEMPLATE"."USERTEST3" IS

PVT_USERID LONG;

PROCEDURE "DELETE_USER" (
"USERID" IN LONG) IS

BEGIN
PVT_USERID := "USERID";
DELETE USERS
WHERE USERID = PVT_USERID;
END "DELETE_USER";

END "USERTEST3";

</code>

Can someone please help me out with this...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2005
Added on Jun 3 2005
3 comments
996 views