开发者

have we limitation in submit some query in c# to oracle

开发者 https://www.devze.com 2022-12-31 20:42 出处:网络
Can I send this query from my C# connection to my oracle connection? 开发者_开发技巧\"Select Object_name,status from object_name where object_type=\'function\';\"

Can I send this query from my C# connection to my oracle connection?

开发者_开发技巧"Select Object_name,status from object_name where object_type='function';"

or

"Select Object_name,status from object_name where object_type='Procedure';"

or

because as I remember, I have this problem when I write a program to connect to Access with java,those days I try to submit some query to get all table name.

regard.


You need to use the Command object:

OracleCommand objCmd = new OracleCommand();
objCmd.Connection = objConn;
objCmd.CommandText = "count_emp_by_dept";
objCmd.CommandType = CommandType.StoredProcedure;
objCmd.Parameters.Add("pin_deptno", OracleType.Number).Value = 20;
objCmd.Parameters.Add("pout_count", OracleType.Number).Direction = ParameterDirection.Output;

http://www.c-sharpcorner.com/UploadFile/john_charles/CallingOraclestoredproceduresfromMicrosoftdotNET06222007142805PM/CallingOraclestoredproceduresfromMicrosoftdotNET.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消