<% Nme = request.form("TXTname") Pwd = request.form("TXTpwd") '--------Initiliasing variables------------------- Dim AdoCon Dim RsSearch Dim SQLProj Dim RsPrc Dim SQLPrc '------Create Connection----------------------------------- Set AdoCon = server.createobject("ADODB.CONNECTION") AdoCon.Open "Driver={MICROSOFT ACCESS DRIVER (*.mdb)};DBQ=" & server.mappath("/DB/fh.mdb") Set RsChck = server.createobject("ADODB.RECORDSET") Set Rscreate = server.createobject("ADODB.RECORDSET") '--------------- SQL Statements ------------------- SQLChck = "Select * from saleslogin where SalesPersonName='" & Nme &"'" SQLcreate = "insert into saleslogin values('" & Nme &"','" & Pwd &"')" '---------------------------------------------------------------- RsChck.Open SQLChck,AdoCon,3,3 if RsChck.recordcount > 0 then response.write "Login name already exists" response.write "Try again" else Rscreate.Open SQLcreate,AdoCon,3,3 response.write "Login created sucessfully" response.write "
" response.write "Login now" end if %> Login Created