Quote:Set dbConn = Server.CreateObject("ADODB.Connection") set RS = server.CreateObject("ADODB.recordset") dbConn.Open Application("SOP_DB_ConnectionString"), _ Application("SOP_DB_RuntimeUserName"), _ Application("SOP_DB_RuntimePassword") Set cmdSQL= server.CreateObject("ADODB.command") sqlStmt = "select * from Parameters where Parameter like ?" cmdSQL.Activeconnection = dbConn cmdSQL.CommandText = sqlStmt cmdSQL.CommandType = adCmdText cmdSQL.Prepared = True ' only needed if u plan to reuse this command often cmdSQL.Parameters.Refresh strSearch = "%conn%" Set prmSQL = cmdSQL.CreateParameter("strVal" , adVarChar, adParamInput, 255,strSearch) cmdSQL.Parameters.Append prmSQL RS.CursorType = 3' adOpenStatic RS.Open cmdSQL,dbConn if RS.BOF and RS.EOF then ' if no connection found -->GETTING ERROR HERE session("ErrorTitle")="the initializing process" session("ErrorText")="Connection failed- Couldn't read SOP parameters from database" Response.Redirect "Error.asp" else ' found record RS.MoveFirst Do while not RS.EOF session(trim(RS.Fields("Parameter").value)) = Trim(RS.Fields("Val").value) RS.MoveNext Loop end if Rs.close
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)