Hi.
The run script below as test to insert a new user in a database.
What changes, if any, I'll have to do to make this work in an Access enviroment?
I'm always getting the error message(in red)
Thanks,
Lucas
<%
dim mySQL, conntemp, rstemp, idCategory, rstemp2
pEmail = randomNumber(9999) & "email@test.com"
posteddata = "customerName=" & "customerName" & randomNumber(9999)
posteddata = posteddata & "&lastName=" & "lastname" & randomNumber(9999)
posteddata = posteddata & "&customerCompany=" & "customerCompany" & randomNumber(9999)
posteddata = posteddata & "&email=" & pEmail
posteddata = posteddata & "&password=" & RC4EnCryptASC("password" & randomNumber(9999), pEncryptionPassword)
posteddata = posteddata & "&phone=" & randomNumber(9999) & "-" & randomNumber(9999)
posteddata = posteddata & "&address=" & "address " & randomNumber(9999)
posteddata = posteddata & "&city= " & "city" & randomNumber(9999)
posteddata = posteddata & "&zip=" & randomNumber(9999)
posteddata = posteddata & "&state=" & ""
posteddata = posteddata & "&stateCode=LA"
posteddata = posteddata & "&countryCode=US"
set xml = Server.CreateObject("Microsoft.XMLHTTP"
xml.Open "GET", " false
xml.Send
call openDb()
mySQL="SELECT idUser FROM users WHERE email='" &pEmail&"'"
call getFromDatabase(mySQL, rstemp, "userRegistration.asp"
' login the registered user
if not rstemp.eof then
Session("idUser " = rstemp("idUser "
else
response.write "<br>Error to get idUser of record inserted"
end if
%>
<br>The User record was added with idUser : <%response.write session("idUser"%>
The run script below as test to insert a new user in a database.
What changes, if any, I'll have to do to make this work in an Access enviroment?
I'm always getting the error message(in red)
Thanks,
Lucas
<%
dim mySQL, conntemp, rstemp, idCategory, rstemp2
pEmail = randomNumber(9999) & "email@test.com"
posteddata = "customerName=" & "customerName" & randomNumber(9999)
posteddata = posteddata & "&lastName=" & "lastname" & randomNumber(9999)
posteddata = posteddata & "&customerCompany=" & "customerCompany" & randomNumber(9999)
posteddata = posteddata & "&email=" & pEmail
posteddata = posteddata & "&password=" & RC4EnCryptASC("password" & randomNumber(9999), pEncryptionPassword)
posteddata = posteddata & "&phone=" & randomNumber(9999) & "-" & randomNumber(9999)
posteddata = posteddata & "&address=" & "address " & randomNumber(9999)
posteddata = posteddata & "&city= " & "city" & randomNumber(9999)
posteddata = posteddata & "&zip=" & randomNumber(9999)
posteddata = posteddata & "&state=" & ""
posteddata = posteddata & "&stateCode=LA"
posteddata = posteddata & "&countryCode=US"
set xml = Server.CreateObject("Microsoft.XMLHTTP"
xml.Open "GET", " false
xml.Send
call openDb()
mySQL="SELECT idUser FROM users WHERE email='" &pEmail&"'"
call getFromDatabase(mySQL, rstemp, "userRegistration.asp"
' login the registered user
if not rstemp.eof then
Session("idUser " = rstemp("idUser "
else
response.write "<br>Error to get idUser of record inserted"
end if
%>
<br>The User record was added with idUser : <%response.write session("idUser"%>