no i test mine on the host provider thingy, lol..
here's the code(it's in multiple files):
connectdb.asp
Code:
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsDatabase 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("../db/db.mdb")
'Create an ADO recordset object
Set rsDatabase = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
'strSQL = "SELECT MainTable.Name, MainTable.Password, MainTable.Email, MainTable.RefPoints, MainTable.Refered, MainTable.RefWanted FROM MainTable;"
strSQL = "SELECT * FROM MainTable;"
%>
Submit.asp
Code:
<%
'Open the recordset with the SQL query
rsDatabase.Open strSQL, adoCon
'Tell the recordset we are adding a new record to it
rsDatabase.AddNew
'Add a new record to the recordset
rsDatabase.Fields("Name") = Request.Form("Name")
rsDatabase.Fields("Password") = Request.Form("Password")
rsDatabase.Fields("Email") = Request.Form("Email")
'Write the updated recordset to the database
rsDatabase.Update
'Redirect to the guestbook.asp page
Response.Redirect "..\index.htm"
%>
disconnectdb.asp
Code:
<%
'Reset server objects
rsDatabase.Close
Set rsDatabase = Nothing
Set adoCon = Nothing
%>
the code is order of use, btw how do i set the lock-type?
!!Mike Ockizitchie!!