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. Fatal error encountered during command execution while executing Mysql query

Fatal error encountered during command execution while executing Mysql query

Scheduled Pinned Locked Moved Database
databasecsharpmysqlhelptutorial
1 Posts 1 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.
  • V Offline
    V Offline
    ven753
    wrote on last edited by
    #1

    Hi i have created one web application and in that i need to read the data from Mysql database and bind to gridview. I have written Mysql query as follows SELECT @row_number:=@row_number+1 AS row_number,Name FROM tablename, (SELECT @row_number:=0) AS r After running in Mysql in database it will and work show the result. But if take same query and execute through C# code below error is coming. An exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll but was not handled in user code Additional information: Fatal error encountered during command execution. and i will get Break or continue pop up. If i give continue it will show Parameter '@row_number' must be defined. even i defined like int @row_number = 0; but same error. I need to achieve serial number as shown below ex in database slno name 10102 nama1 2123 name2 5203 name3 result 1 nama1 2 name2 3 name3 how to achieve this. If anybody knows please reply me. Thanks in advance.

    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