mdb
02-12-2005, 05:50 PM
I have an example here that I need to convert to DSN less.
can somebody help me out?
Thanks
I think the dsn is autoexample
<!-- #include file="adovbs.inc" -->
<%
' Create a RecordSet object
Set Rs = Server.CreateObject("ADODB.RecordSet")
' Open the table
Rs.Open "tUsers", "AutoExample", adOpenKeySet, adLockPessimistic, adCmdTable
' Add a new record
Rs.AddNew
Rs("UserName") = Request.Form("USERNAME")
Rs("UserEmail") = Request.Form("USEREMAIL")
' Update the record
Rs.Update
' Retrive the ID
lUserID = Rs("UserID")
' Close the RecordSet
Rs.Close
Set Rs = Nothing
%>
<HTML>
<BODY BGCOLOR=FFFFFF>
<H3>Autonumber Example</H3>
<P>
Thank you, <% =Request.Form("USERNAME") %>! Your ID is <% =lUserID %>.
</P>
</BODY>
</HTML>
can somebody help me out?
Thanks
I think the dsn is autoexample
<!-- #include file="adovbs.inc" -->
<%
' Create a RecordSet object
Set Rs = Server.CreateObject("ADODB.RecordSet")
' Open the table
Rs.Open "tUsers", "AutoExample", adOpenKeySet, adLockPessimistic, adCmdTable
' Add a new record
Rs.AddNew
Rs("UserName") = Request.Form("USERNAME")
Rs("UserEmail") = Request.Form("USEREMAIL")
' Update the record
Rs.Update
' Retrive the ID
lUserID = Rs("UserID")
' Close the RecordSet
Rs.Close
Set Rs = Nothing
%>
<HTML>
<BODY BGCOLOR=FFFFFF>
<H3>Autonumber Example</H3>
<P>
Thank you, <% =Request.Form("USERNAME") %>! Your ID is <% =lUserID %>.
</P>
</BODY>
</HTML>