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. Database & SysAdmin
  3. Database
  4. Add a semi-colon (;) to the end of my select statement

Add a semi-colon (;) to the end of my select statement

Scheduled Pinned Locked Moved Database
databasequestioncomhelp
2 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.
  • I Offline
    I Offline
    inyoursadachine
    wrote on last edited by
    #1

    Hi, I'm making an OleDbConnection using the Sybase ASE OLE DB Provider with the following code: _____________________________________________________________________ OleDbConnection oDbConn = new OleDbConnection(sConnectionString); OleDbCommand oCmd = new OleDbCommand("SELECT * from master.table;", oDbConn); OleDbDataAdapter oData = new OleDbDataAdapter(oCmd.CommandText, oConn); DataTable oTable = new DataTable("master.table"); oData.Fill(oTable); __________________________________________________________________ The database I'm connecting to -requires- a semi-colon at the end of the SELECT command. I've tried ending my SELECT with a semi-colon (see above) but one of my OleDb objects is removing it before it is sent to the database as I can see the following databas error when running my program: SQL Parser: parse error at line 1. Command: SELECT * from master.table Issued by: How do I control the SQL statements sent to the database via the OleDbConnection so I can add a semi-colon to my SELECTs?? TIA, Matt

    V 1 Reply Last reply
    0
    • I inyoursadachine

      Hi, I'm making an OleDbConnection using the Sybase ASE OLE DB Provider with the following code: _____________________________________________________________________ OleDbConnection oDbConn = new OleDbConnection(sConnectionString); OleDbCommand oCmd = new OleDbCommand("SELECT * from master.table;", oDbConn); OleDbDataAdapter oData = new OleDbDataAdapter(oCmd.CommandText, oConn); DataTable oTable = new DataTable("master.table"); oData.Fill(oTable); __________________________________________________________________ The database I'm connecting to -requires- a semi-colon at the end of the SELECT command. I've tried ending my SELECT with a semi-colon (see above) but one of my OleDb objects is removing it before it is sent to the database as I can see the following databas error when running my program: SQL Parser: parse error at line 1. Command: SELECT * from master.table Issued by: How do I control the SQL statements sent to the database via the OleDbConnection so I can add a semi-colon to my SELECTs?? TIA, Matt

      V Offline
      V Offline
      VenkatFor NET
      wrote on last edited by
      #2

      could you explain why you need a ';' and also see if you can use a stored procedure to achieve the same. Bhaskara

      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