this is a script i would like to use for a website. from my understanbding this is a connectionless file. can somebody try to help me how i would change this script in a form that i can use the dns "login" with it?
<%@ Language=VBScript %>
<HTML><HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
</HEAD>
<BODY>
<%
Dim sSQL,conn,rs
Set conn = Server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")
'DSN less connection
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.ConnectionString = "Data Source=" & Server.MapPath("fpdb/login.mdb")
conn.open
strsql = "Select firstname,lastname from Results"
set rs = conn.Execute (strsql)
if (rs.BOF)and (rs.EOF) then
sSQL = "Insert into Results (firstname,lastname,User_name,pw) Values" & _
"('"& Ucase(Request("firstname")) & "', '"& Request("lastname") & "', '"& _
Request("userid") & "', '" & Request("pw") & "')"
conn.Execute sSQL,adCmdText
else
SQL = "Delete * from Results where User_name= '" & Request.Form("userid") & "'"
conn.execute(SQL)
end if
sSQL = "Insert into Results (firstname,lastname,User_name,pw) Values" & _
"('"& Ucase(Request("firstname")) & "', '"& Request("lastname") & "', '"& _
Request("userid") & "', '" & Request("pw") & "')"
conn.Execute sSQL,adCmdText
'close the recordset
rs.close
set rs = nothing
'close the connection
conn.close
set conn = nothing
%>
<h2>Your login details have been saved to the database<h2>
</BODY>
</HTML>
Thank you in advance
Best,
Andrea