- Home
·
- Miscellaneous
·
- Sample ASP code for registering an email address in a database. Registration, Email address. online
Sample ASP code for registering an email address in a database. Registration, Email address. online
Sample ASP code for registering an email address in a database. Registration, Email address. online activity
Rate Sample ASP code for registering an email address in a database. Registration, Email address. online
(1(1 Vote))
<%option explicit%>
<%
dim item
dim val
dim oRs
dim Connection
dim vSql
dim Added
Added=False
for each item in Request.Form
if item="EmailId" then
val=Request.Form(item)
end if
next
set Connection=server.CreateObject ("AdoDB.Connection")
Connection.Open "DSN=Dbsname;uid=Admin;pwd=;"
set oRs=server.CreateObject ("AdoDB.RecordSet")
vSql="select * from Account where Email='" & val &"'"
oRs.Open vsql,connection,adOpenDynamic,adLockPessimistic
if oRs.EOF=true and oRs.BOF=true then
oRs.Close
oRs.Open "Account",connection,adOpenDynamic,adLockPessimistic,adCmdTable
oRs.AddNew
oRs("Email")=val
oRs.Update
oRs.Close
Added=True
else
oRs.Close
Added=false
end if
set oRs=nothing
Connection.Close
set connection=nothing
%>
Sample ASP code for registering an email address in a database. Registration, Email address. online Comments
No comments yet — be the first to post one!
Post a Comment