|
When I use any html file that calls an ASP file IE displays the content of that file on screen and nothing saves to the DB. I have XP Pro SP2 and IIS v 5.1 My html form, .asp file and the Access DB are all saved in my C:\Inetpub\wwwroot directory. I uninstalled IE and IIS at the advice of a friend to make sure they were installed fully etc. The only other thing I can think of trying is to uninstall Access and reinstall. I downloaded the following example http://www.codefixer.com/tutorials/form_to_database.asp
to see if a simple form would save and followed the directions fully with the same result as the form I created. Here is an example of what I see from IE when any html form calls an .asp file.
Any help would be greatly appreciated!
<%@ Language="VBScript" %>
<% Option Explicit %>
<html>
<head>
<title>Form to database</title>
</head>
<body>
<%
Dim name, email, comments
Dim sConnString, connection, sSQL
name = Request.Form("name")
email = Request.Form("email")
comments =Request.Form("comments")
sSQL = "INSERT into users_tbl (name, email, comments) values ('" & _
name & "', '" & email & "', '" & comments & "')"
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("Users.mdb")
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open(sConnString)
connection.execute(sSQL)
response.write "The form information was inserted successfully."
connection.Close
Set connection = Nothing
%>
</body>
</html>
|
|
|
Hi!
Stupid question, but have you checked Windows Explorer - Tools - Folder Options - File Types?
Sometimes the default application for opening .asp files is incorrectly set as IE and not notepad or the like.
All the best
Cathy
|
|
|
|
|
|
|
|