1. Write the SQL statement in PL/C, and habitually end with a semicolon (";"), but write the SQL statement without adding ";".
For example:
With data as (...) SELECT * from data;
With a semicolon in the back, I'll report a
ORA-00911: Invalid character
Such a mistake.
2. Call stored procedures in C #, often make common sense errors, the following is the correct way to use
Note: Here the parameter name cannot be preceded by ":" oracleparameter[] parameter = {New OracleParameter ("P_pscode", oracletype.number,15), new Oracl Eparameter ("P_outputcode", oracletype.number,3), New OracleParameter ("P_pollutantcode", oracletype.varchar,50), new OracleParameter ("P_outmsg", oracletype.varchar,500)};p arameter[0]. Value = model.pscode;parameter[1]. Value = model.outputcode;parameter[2]. Value = Model.pollutantcode; PARAMETER[3]. Direction = System.Data.ParameterDirection.Output; Dbhelperora.runprocedure ("Pkg_dataxy.proc_hourwaterinputfacdata", parameter); String msg = Parameter[3]. Value.tostring ();
Oracle Practical Essays in C #