Hello I trying to get the email address from the database and input it to the asp code or html. I was able to read the email address from the database but not able to store the value. How can I store the value? Response.Write bs("email_addr") its reading from the database. But when added Set storeEmail = response.Write bs("email_addr") it gives me error message Microsoft VBScript compilation error '800a0401'
Expected end of statement line 44 which is Set storeEmail = Response.Write bs("email_addr"). Please help im new with asp. Thanks
DIM objConn, bs, ossql
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=MSDASQL.1;Password=**;Persist Security Info=True;User ID=**;Data Source=**"
ossql = "SELECT email_addr FROM user WHERE username = '" & strUsername & "' AND system_code= '" & strHealth & "' AND facility_code = '"& strFacility & "'"
Set bs = objConn.Execute(ossql)
DIM storeEmail
Response.Write bs("email_addr")