Hi Paul - Yes, I'm running IIS with Windows 2000. I'm now running the files from http://localhost/MyWeb/form.html
I'm now trying this cleaned-up code for the asp file:
<html>
<head>
<title>Adding data to database</title>
</head>
<body>
Adding data to database...
<%
'Dimension variables
Dim conn
Dim rs
Dim strSQL
'Create an ADO connection object
Set conn=Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN connection
conn.Open "DSN=profiles"
'Create an ADO recordset object
Set rs=Server.CreateObject("ADODB.Recordset")
strSQL="SELECT* FROM Facility;"
'Open the recordset with the SQL query
rs.Open strSQL, conn
'rs.CursorType=2
'Set the cursor type we are using so we can navigate through the recordset
'rsDatabase.LockType=3
'Set the lock type so that the record is locked by ADO when it is updated
rs.AddNew
'Tell the recordset we are adding a new record to it
rs.Fields("Facility_id")=Request.Form("Facility_id")
rs.Fields("Facility_name")=Request.Form("Facility_name")
rs.Fields("Facility_description")=Request.Form("Facility_description")
rs.Fields("Street_address1")=Request.Form("Street_address1")
rs.Fields("Street_address2")=Request.Form("Street_address2")
rs.Fields("City")=Request.Form("City")
rs.Fields("State")=Request.Form("State")
rs.Fields("Zipcode")=Request.Form("Zipcode")
rs.Fields("Website")=Request.Form("Website")
rs.Fields("Image")=Request.Form("Image")
'Add a new record to the dataset
rs.Update
'Write the updated recordset to the database
'Reset server objects
rs.Close
Set rs=Nothing
Set conn=Nothing
Response.Redirect "display_profile_db.asp"
'To display all the records in the database, including the new ones
%>
</body>
</html>
But, when I run it -- Line 37 rs.AddNew gives me this error:
Error Type:
ADODB.Recordset (0x800A0CB3)
Object or provider is not capable of performing requested operation.
/MyWeb/add_to_db3.asp, line 37