hi i am using oracle db. getting in the following statements.”ORA-00936: missing expression”
string sqlquery = ("select parent from tn2 where CONNECT BY PRIOR child=" + node);
string connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.60.212.62)(PORT=1521)))(CONNECT_DATA=(SID=orcl)));User Id=apex_demo;Password=apex_demo;";
OracleConnection con = new OracleConnection(connectionString);
con.Open();
OracleDataAdapter adapter = new OracleDataAdapter(sqlquery, con);
adapter.Fill(objDT1);
con.Close();
Remove the semicolon at the end of the SQL statement. It is not allowed when executing SQL statements from .NET.
Also, the
whereis invalid here, because you don’t provide a condition. TheCONNECT BY PRIORis nowherecondition but a construct on its own. See here for more info on how to useCONNECT BY PRIOR.