[VB.NET]在VB.NET 2005中,如何创建Oracle的存储过程,以及如何来使用存储过程语句?

前端之家收集整理的这篇文章主要介绍了[VB.NET]在VB.NET 2005中,如何创建Oracle的存储过程,以及如何来使用存储过程语句?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在VB.NET 2005中,如何创建Oracle的存储过程,以及如何来使用存储过程语句? 在VB.NET 2005中,如何创建Oracle的存储过程语句,并且在程序中调用这些存储过程语句。有没有相关的学习网址? __________________________________________________________________________ mark __________________________________________________________________________ 给你帖一个(部分)CREATE OR REPLACE PACKAGE BODY PACKAGE_YHXX_SHOUDIAN IS PROCEDURE QUERY_YHXX(V_DF_DK_YHXX_PARA IN VARCHAR2,V_DF_DK_YHXX_FLAG IN NUMBER,CUR_V_DF_DK_YHXX OUT V_DF_DK_YHXX_CURSOR) IS BEGIN IF V_DF_DK_YHXX_FLAG = 0 THEN --按用户编号 OPEN CUR_V_DF_DK_YHXX FOR SELECT YHBH,YHMC,YDDZ,DH,FJBM,JHRQ,JCXH,DYXH,JFDXH,SSXH,ZCBH FROM V_DF_DK_YHXX WHERE V_DF_DK_YHXX.YHBH = V_DF_DK_YHXX_PARA; ELSIF V_DF_DK_YHXX_FLAG = 1 THEN --按用户姓名 OPEN CUR_V_DF_DK_YHXX FOR SELECT YHBH,ZCBH FROM V_DF_DK_YHXX WHERE V_DF_DK_YHXX.YHMC LIKE ''% '' || V_DF_DK_YHXX_PARA || ''% ''; ELSIF V_DF_DK_YHXX_FLAG = 2 THEN --按用户地址 OPEN CUR_V_DF_DK_YHXX FOR SELECT YHBH,ZCBH FROM V_DF_DK_YHXX WHERE V_DF_DK_YHXX.YDDZ LIKE ''% '' || V_DF_DK_YHXX_PARA || ''% ''; ELSIF V_DF_DK_YHXX_FLAG = 3 THEN --按资产编号 OPEN CUR_V_DF_DK_YHXX FOR SELECT YHBH,ZCBH FROM V_DF_DK_YHXX WHERE V_DF_DK_YHXX.ZCBH = V_DF_DK_YHXX_PARA; END IF; END QUERY_YHXX; cmd_query.CommandText = "package_yhxx_shoudian.query_yhxx_more_g " cmd_query.CommandType = CommandType.StoredProcedure cmd_query.Connection = mis_con() cmd_query.Parameters.Add( "v_df_dk_yhbh ",OracleType.VarChar).Value = Trim(TextBox1.Text) cmd_query.Parameters.Add( "cur_v_df_dk_yhxx ",OracleType.Cursor).Direction = ParameterDirection.Output dr = cmd_query.ExecuteReader() Do While dr.Read TextBox2.Text = IIf(IsDBNull(dr( "YHMC ").ToString) = True," ",dr( "YHMC ").ToString) ''YHMC TextBox3.Text = IIf(IsDBNull(dr( "DH ").ToString) = True,dr( "DH ").ToString) ''DH TextBox4.Text = IIf(IsDBNull(dr( "YDDZ ").ToString) = True,dr( "YDDZ ").ToString) ''YDDZ TextBox5.Text = IIf(IsDBNull(dr( "BL ").ToString) = True,dr( "BL ").ToString) ''BL TextBox14.Text = IIf(IsDBNull(dr( "DJ ").ToString) = True,"0 ",dr( "DJ ").ToString) ''DJ " TextBox18.Text = IIf(IsDBNull(dr( "ZCBH ").ToString) = True,dr( "ZCBH ").ToString) ''ZCBH __________________________________________________________________________ 原文链接:https://www.f2er.com/vb/263842.html

猜你在找的VB相关文章