codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Can`t use ASP/VBSCRIPT to save to local Access 2002 DB  randbee at 04:17 on Monday, August 08, 2005
 

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>



  Re: Can`t use ASP/VBSCRIPT to save to local Access 2002 DB  czhammond at 21:11 on Wednesday, April 05, 2006
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  begginer error
•  Re: Converting VC++6 to VC++8, Wrong Library Files
•  Re: Grep or fgrep ??
•  php on two apache vurtualhost sites
•  Dynamically use a text file
•  Text formatting in Perl
•  Re: dynamic crystal report generation
•  Grep or fgrep ??
•  Grep or fgrep ??


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006