Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open DB Changes to make SQL/Access

Status
Not open for further replies.

Lucas68

Programmer
May 9, 2001
14
BR
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) & &quot;email@test.com&quot;
posteddata = &quot;customerName=&quot; & &quot;customerName&quot; & randomNumber(9999)
posteddata = posteddata & &quot;&lastName=&quot; & &quot;lastname&quot; & randomNumber(9999)
posteddata = posteddata & &quot;&customerCompany=&quot; & &quot;customerCompany&quot; & randomNumber(9999)
posteddata = posteddata & &quot;&email=&quot; & pEmail
posteddata = posteddata & &quot;&password=&quot; & RC4EnCryptASC(&quot;password&quot; & randomNumber(9999), pEncryptionPassword)
posteddata = posteddata & &quot;&phone=&quot; & randomNumber(9999) & &quot;-&quot; & randomNumber(9999)
posteddata = posteddata & &quot;&address=&quot; & &quot;address &quot; & randomNumber(9999)
posteddata = posteddata & &quot;&city= &quot; & &quot;city&quot; & randomNumber(9999)
posteddata = posteddata & &quot;&zip=&quot; & randomNumber(9999)
posteddata = posteddata & &quot;&state=&quot; & &quot;&quot;
posteddata = posteddata & &quot;&stateCode=LA&quot;
posteddata = posteddata & &quot;&countryCode=US&quot;

set xml = Server.CreateObject(&quot;Microsoft.XMLHTTP&quot;)
xml.Open &quot;GET&quot;, &quot; false
xml.Send

call openDb()

mySQL=&quot;SELECT idUser FROM users WHERE email='&quot; &pEmail&&quot;'&quot;
call getFromDatabase(mySQL, rstemp, &quot;userRegistration.asp&quot;)
' login the registered user

if not rstemp.eof then
Session(&quot;idUser &quot;) = rstemp(&quot;idUser &quot;)
else
response.write &quot;<br>Error to get idUser of record inserted&quot;

end if
%>
<br>The User record was added with idUser : <%response.write session(&quot;idUser&quot;)%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top