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. Web Development
  3. Linux, Apache, MySQL, PHP
  4. sql error

sql error

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
databasehelpmysqlsysadminannouncement
3 Posts 2 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.
  • N Offline
    N Offline
    nitish_07
    wrote on last edited by
    #1

    I have a button in my form and on click of that button I am writing this code....
    <pre>
    OdbcCommand cmd ;
    cmd = new OdbcCommand("abc", cn);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.ExecuteNonQuery();

    I have made a procedure named abc in database which is returning only one row from login table..So i am just checking that on click of that button my procedure should run but while debugging when i come to cmd.ExecuteQuery() it throws following error.. ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.77-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'abc()' at line 1. So plz tell me what should be the problem.

    C 1 Reply Last reply
    0
    • N nitish_07

      I have a button in my form and on click of that button I am writing this code....
      <pre>
      OdbcCommand cmd ;
      cmd = new OdbcCommand("abc", cn);
      cmd.CommandType = CommandType.StoredProcedure;
      cmd.ExecuteNonQuery();

      I have made a procedure named abc in database which is returning only one row from login table..So i am just checking that on click of that button my procedure should run but while debugging when i come to cmd.ExecuteQuery() it throws following error.. ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.77-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'abc()' at line 1. So plz tell me what should be the problem.

      C Offline
      C Offline
      CodingLover
      wrote on last edited by
      #2

      Can you show us the procedure that you have written?

      I appreciate your help all the time... CodingLover :)

      N 1 Reply Last reply
      0
      • C CodingLover

        Can you show us the procedure that you have written?

        I appreciate your help all the time... CodingLover :)

        N Offline
        N Offline
        nitish_07
        wrote on last edited by
        #3

        Sir I have corrected that...thanks...:)

        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