Add a semi-colon (;) to the end of my select statement
-
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
-
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
could you explain why you need a ';' and also see if you can use a stored procedure to achieve the same. Bhaskara