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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. using orcle server client

using orcle server client

Scheduled Pinned Locked Moved ASP.NET
databasecomsysadminhelpannouncement
3 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.
  • B Offline
    B Offline
    brettokumar
    wrote on last edited by
    #1

    hi i my pro im using orcale client server while i m using update query i run properly. but instead of query im using storeprocedure i can not execute it display error like 'invalid sql statement ' if im execute that procedure in my pl/sql it run properly my code is like in my sapx.cs file string Qry = "Exec user_insert_proc('BW100000906','127.0.0.1','acibre','BrettoKumar','09006833242hijklm', 'bretto_be@yahoo.com',2,'abraham','Bretto','Abraham','1','27-Apr-1971','','22-Sep-2008 12:37:55 AM','22-Sep-2008 12:37:55 AM','ttk','alwarpet','620001','chennai','tamilnadu','BW','04411-123456789','0441-123456789','91-98947455711','','','8237536982482857233565195638026419924352543044988390181159607082248527607624911769985440292861738021','22-Sep-2008 12:37:55')"; public string exeQry(string qry) { if (Con.State == ConnectionState.Closed) { Con.Open(); } cmd = new OracleCommand(qry, Con); cmd.ExecuteOracleNonQuery(); Con.Close(); } it display error like ORA:00900 invalide sql statement

    with regards, bretto

    A N 2 Replies Last reply
    0
    • B brettokumar

      hi i my pro im using orcale client server while i m using update query i run properly. but instead of query im using storeprocedure i can not execute it display error like 'invalid sql statement ' if im execute that procedure in my pl/sql it run properly my code is like in my sapx.cs file string Qry = "Exec user_insert_proc('BW100000906','127.0.0.1','acibre','BrettoKumar','09006833242hijklm', 'bretto_be@yahoo.com',2,'abraham','Bretto','Abraham','1','27-Apr-1971','','22-Sep-2008 12:37:55 AM','22-Sep-2008 12:37:55 AM','ttk','alwarpet','620001','chennai','tamilnadu','BW','04411-123456789','0441-123456789','91-98947455711','','','8237536982482857233565195638026419924352543044988390181159607082248527607624911769985440292861738021','22-Sep-2008 12:37:55')"; public string exeQry(string qry) { if (Con.State == ConnectionState.Closed) { Con.Open(); } cmd = new OracleCommand(qry, Con); cmd.ExecuteOracleNonQuery(); Con.Close(); } it display error like ORA:00900 invalide sql statement

      with regards, bretto

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      The error is thrown from oracle. Please check if the query you have prepared is running on actual oracle console or not.

      Abhishek Sur

      1 Reply Last reply
      0
      • B brettokumar

        hi i my pro im using orcale client server while i m using update query i run properly. but instead of query im using storeprocedure i can not execute it display error like 'invalid sql statement ' if im execute that procedure in my pl/sql it run properly my code is like in my sapx.cs file string Qry = "Exec user_insert_proc('BW100000906','127.0.0.1','acibre','BrettoKumar','09006833242hijklm', 'bretto_be@yahoo.com',2,'abraham','Bretto','Abraham','1','27-Apr-1971','','22-Sep-2008 12:37:55 AM','22-Sep-2008 12:37:55 AM','ttk','alwarpet','620001','chennai','tamilnadu','BW','04411-123456789','0441-123456789','91-98947455711','','','8237536982482857233565195638026419924352543044988390181159607082248527607624911769985440292861738021','22-Sep-2008 12:37:55')"; public string exeQry(string qry) { if (Con.State == ConnectionState.Closed) { Con.Open(); } cmd = new OracleCommand(qry, Con); cmd.ExecuteOracleNonQuery(); Con.Close(); } it display error like ORA:00900 invalide sql statement

        with regards, bretto

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        brettokumar wrote:

        'invalid sql statement '

        Error message is clear, isn't it?

        brettokumar wrote:

        string Qry = "Exec user_insert_proc('BW100000906','127.0.0.1','acibre','BrettoKumar','09006833242hijklm', 'bretto_be@yahoo.com',2,'abraham','Bretto','Abraham','1','27-Apr-1971','','22-Sep-2008 12:37:55 AM','22-Sep-2008 12:37:55 AM','ttk','alwarpet','620001','chennai','tamilnadu','BW','04411-123456789','0441-123456789','91-98947455711','','','8237536982482857233565195638026419924352543044988390181159607082248527607624911769985440292861738021','22-Sep-2008 12:37:55')";

        What a disaster. Read about SQL Injection and change this to parametrized queries.

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

        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