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. Want to Execute MySql Stored procedure in Dot Net

Want to Execute MySql Stored procedure in Dot Net

Scheduled Pinned Locked Moved Web Development
databasehelpmysqlsysadminannouncement
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.
  • H Offline
    H Offline
    Hemant Thaker
    wrote on last edited by
    #1

    Hi.. buddies I am using MSVS 2008 and Mysql server 5.0. I want to fetch records in my webform through stored procedure stored in mysql database. But when i execute the code i m getting following error msg; "ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-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 'Exec Area_Of_Rec_M_SelectAll()'" Could you tell me the right code to handle the problem. Thanks Hemant Thaker.

    By: Hemant Thaker

    A 1 Reply Last reply
    0
    • H Hemant Thaker

      Hi.. buddies I am using MSVS 2008 and Mysql server 5.0. I want to fetch records in my webform through stored procedure stored in mysql database. But when i execute the code i m getting following error msg; "ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-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 'Exec Area_Of_Rec_M_SelectAll()'" Could you tell me the right code to handle the problem. Thanks Hemant Thaker.

      By: Hemant Thaker

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      Hemant Thaker wrote:

      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 'Exec Area_Of_Rec_M_SelectAll()'

      I think its trying to tell you something here.

      Bob Ashfield Consultants Ltd

      H 1 Reply Last reply
      0
      • A Ashfield

        Hemant Thaker wrote:

        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 'Exec Area_Of_Rec_M_SelectAll()'

        I think its trying to tell you something here.

        Bob Ashfield Consultants Ltd

        H Offline
        H Offline
        Hemant Thaker
        wrote on last edited by
        #3

        I got the resolution. it's "Call Stored_proc_Name" This should be your command object's CommandText property. Thanks

        By: Hemant Thaker

        M 1 Reply Last reply
        0
        • H Hemant Thaker

          I got the resolution. it's "Call Stored_proc_Name" This should be your command object's CommandText property. Thanks

          By: Hemant Thaker

          M Offline
          M Offline
          Mark Schumann
          wrote on last edited by
          #4

          Or you can set .CommandType to ystem.Data.CommandType.StoredProcedure and set .CommandText to the name of the stored procedure. I think this is supposed to run slightly faster as the server doesn't have to parse out the "CALL" command.

          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