Public Function sys_Module_GetKey(ByVal ModuleID As Integer, ByVal ModuleName As String, ByVal KeyName As String, ByRef KeyValue As String) As Long
Dim cmd As ADODB.Command, p As ADODB.Parameters
Set cmd = New ADODB.Command
cmd.ActiveConnection = modADO.GetConnectionString()
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "sys_Module_GetKey"
Set p = cmd.Parameters
p.Append cmd.CreateParameter("RETURN_VALUE", adInteger, adParamReturnValue)
p.Append cmd.CreateParameter("@ModuleID", adSmallInt, adParamInput, , ModuleID)
p.Append cmd.CreateParameter("@ModuleName", adVarChar, adParamInput, 50, ModuleName)
p.Append cmd.CreateParameter("@KeyName", adVarChar, adParamInput, 20, KeyName)
p.Append cmd.CreateParameter("@KeyValue", adVarChar, adParamOutput, 2000)
p.Append cmd.CreateParameter("@IsEncrypted", adBoolean, adParamOutput)
cmd.Execute , , adExecuteNoRecords
KeyValue = p("@KeyValue")
sys_Module_GetKey = p("RETURN_VALUE").Value
Set p = Nothing
Set cmd = Nothing
End Function
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 7