Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Oracle message, error that makes no sense

Oracle message, error that makes no sense

Scheduled Pinned Locked Moved Database
databaseoraclehelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eggsovereasy
    wrote on last edited by
    #1

    I have a stored procedure in oracle that looks like this: PROCEDURE validate_master_account_id (v_master_account_id IN NUMBER, v_is_valid OUT NUMBER); And a procedure that looks like this: public static bool TestProcedure() {   string procedureName = "SMT.CPR_MASTER_ACCOUNT_PKG.validate_master_account_id";   using (OracleConnection connection = new OracleConnection(AppSettings.ConnectionString))   {     connection.Open();     using (OracleCommand command = new OracleCommand(procedureName, connection))     {       command.Parameters.Add("v_master_account_id", OracleType.Number).Value = 16793;       command.Parameters.Add("v_is_valid", OracleType.Number).Direction = ParameterDirection.Output;       command.ExecuteNonQuery();       bool result = ((int) command.Parameters["v_is_valid"].Value) == 1;       return result;     }   } } I get an error message that says "ORA-01036: illegal variable name/number" and I can't figure out why? Thanks in advance.

    B M 2 Replies Last reply
    0
    • E eggsovereasy

      I have a stored procedure in oracle that looks like this: PROCEDURE validate_master_account_id (v_master_account_id IN NUMBER, v_is_valid OUT NUMBER); And a procedure that looks like this: public static bool TestProcedure() {   string procedureName = "SMT.CPR_MASTER_ACCOUNT_PKG.validate_master_account_id";   using (OracleConnection connection = new OracleConnection(AppSettings.ConnectionString))   {     connection.Open();     using (OracleCommand command = new OracleCommand(procedureName, connection))     {       command.Parameters.Add("v_master_account_id", OracleType.Number).Value = 16793;       command.Parameters.Add("v_is_valid", OracleType.Number).Direction = ParameterDirection.Output;       command.ExecuteNonQuery();       bool result = ((int) command.Parameters["v_is_valid"].Value) == 1;       return result;     }   } } I get an error message that says "ORA-01036: illegal variable name/number" and I can't figure out why? Thanks in advance.

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      take a google search...[^]


      I Love T-SQL "Don't torture yourself,let the life to do it for you."

      1 Reply Last reply
      0
      • E eggsovereasy

        I have a stored procedure in oracle that looks like this: PROCEDURE validate_master_account_id (v_master_account_id IN NUMBER, v_is_valid OUT NUMBER); And a procedure that looks like this: public static bool TestProcedure() {   string procedureName = "SMT.CPR_MASTER_ACCOUNT_PKG.validate_master_account_id";   using (OracleConnection connection = new OracleConnection(AppSettings.ConnectionString))   {     connection.Open();     using (OracleCommand command = new OracleCommand(procedureName, connection))     {       command.Parameters.Add("v_master_account_id", OracleType.Number).Value = 16793;       command.Parameters.Add("v_is_valid", OracleType.Number).Direction = ParameterDirection.Output;       command.ExecuteNonQuery();       bool result = ((int) command.Parameters["v_is_valid"].Value) == 1;       return result;     }   } } I get an error message that says "ORA-01036: illegal variable name/number" and I can't figure out why? Thanks in advance.

        M Offline
        M Offline
        MarkTime
        wrote on last edited by
        #3

        Remember the error is coming from Oracle, not from C#. Set the commandtype to stored procedure.

        E 1 Reply Last reply
        0
        • M MarkTime

          Remember the error is coming from Oracle, not from C#. Set the commandtype to stored procedure.

          E Offline
          E Offline
          eggsovereasy
          wrote on last edited by
          #4

          Yeah, that did it, thank you.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups