Hi,
My question is two-fold.
1. Is there a way of hiding the username and password when connection to a SQL server database (code shown below) so that they cannot be seen if View/source is chosen?
2. If not, I store the username and password entered from the logon screen in session variables, how can session variables be accessed in VBScript?? ie how can I replace the hardcoded username and password with the values stored in the session variables?
'create database connection
set objConn=CreateObject("ADODB.Connection"
strConnection = "Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=SchoolStaffing;Data Source=development"
strConnection = strConnection & ";user id=schoolstaffing; password=sspword"
objConn.open strConnection
<SCRIPT language="vbscript">
private sub SaveCEODetails()
'generate the sql stmt
strSQL = "select * from lookup"
'create the recordset
set rsData = objConn.Execute(strSQL)
...do things here and close the recordset and db connection
end sub
</SCRIPT>
My question is two-fold.
1. Is there a way of hiding the username and password when connection to a SQL server database (code shown below) so that they cannot be seen if View/source is chosen?
2. If not, I store the username and password entered from the logon screen in session variables, how can session variables be accessed in VBScript?? ie how can I replace the hardcoded username and password with the values stored in the session variables?
'create database connection
set objConn=CreateObject("ADODB.Connection"
strConnection = "Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=SchoolStaffing;Data Source=development"
strConnection = strConnection & ";user id=schoolstaffing; password=sspword"
objConn.open strConnection
<SCRIPT language="vbscript">
private sub SaveCEODetails()
'generate the sql stmt
strSQL = "select * from lookup"
'create the recordset
set rsData = objConn.Execute(strSQL)
...do things here and close the recordset and db connection
end sub
</SCRIPT>