zoukankan      html  css  js  c++  java
  • 在vb程序中对存储过程的参数变量进行初始化:如下:

    C:如下:
        COM.Parameters.Append COM.CreateParameter("sParamName", adVarChar, adParamInput, 20, sParamName)
         COM.Parameters.Append COM.CreateParameter("ParamValue", adVarChar, adParamOutput, 20, ParamValue)
        存储过程,和vb程序段如下:
        存储过程:
        PROCEDURE "ZY_GET_SYS_PARAM"
         (ParamName in varchar,
         ParamValue out varchar )
         AS
        BEGIN
         SELECT Param_Value
         INTO ParamValue
         from ZY_CARD_PARAM
         where param_name=ParamName;
        END;
        
        VB
        相关函数
        Public Function GetUnitParam(ByVal sParamName As String) As String
        
         Dim CNN As New ADODB.Connection
         Dim COM As New ADODB.Command
         CNN.ConnectionString = "Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=SYSMAN;PASSWORD=KKND;Data Source=KKND"
         CNN.Open
        
         COM.ActiveConnection = CNN
         COM.CommandType = adCmdStoredProc
         COM.CommandText = "ZY_Get_Sys_Param"
        
         COM.Parameters.Append COM.CreateParameter("sParamName", adVarChar, adParamInput, 20, sParamName)
         COM.Parameters.Append COM.CreateParameter("ParamValue", adVarChar, adParamOutput, 20, ParamValue)
        
         COM.Execute
         GetUnitParam = COM("ParamValue")
         Exit Function
        
        End Function
  • 相关阅读:
    #一点杂记
    《洛谷P3373 【模板】线段树 2》
    《Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020
    《牛客练习赛72C》
    《hdu2819》
    《hdu2818》
    《Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad)》
    《51nod1237 最大公约数之和 V3》
    对输入的单词进行排序
    快速排序
  • 原文地址:https://www.cnblogs.com/zqmingok/p/1514000.html
Copyright © 2011-2022 走看看