Dim strSQLConnection dim strPass2 strSQLConnection = "driver={SQL Server};server=[servername];database=[DB name];uid=;pwd=;" Set Conn = Server.CreateObject("ADODB.Connection") Set objCommand = Server.CreateObject("ADODB.Command") Set objParam = Server.CreateObject("ADODB.Parameter") Set rstUsers = Server.CreateObject("ADODB.Recordset") Conn.Open strSQLConnection objCommand.ActiveConnection = strSQLConnection objCommand.commandtext = "Getdetails" objCommand.CommandType = 4 'defines cmd type as stored proc Set objParm = objCommand.CreateParameter("@UserId", 3,1,,strUserId) objCommand.Parameters.Append objParm set rstUsers = objCommand.Execute If Not rstUsers.EOF Then strPass2 = rstUsers("ntuserid") End if
strUserId
Option Explicit
Set objParm = ...
.Append objParm
objParam
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)