|
-
Dec 7th, 2001, 05:03 PM
#1
Thread Starter
Lively Member
asp prob
I am using a office 2000 access database and I am trying to add some data to a database.
It is not working. Please can someone tell me what I have done wrong. am i calling the wrong type of database. all the files are in the same folder:
<% @language=vbscript %>
<!--#include file="adovbs.inc"-->
<%
dim conn, rs
dim strQ
dim txtsurname
txtsurname = request.querystring("surname")
dim txtinitials
txtinitials =request.querystring("initials")
dim txtAdd1
txtAdd1 =request.querystring("Address1")
dim txtAdd2
txtAdd2=request.querystring("Address2")
dim txtcity
txtcity =request.querystring("City")
dim txtpost
txtpost =request.querystring("Post Code")
dim txtHmphone
txtHmphone =request.querystring("Home Telephone")
dim txtMoby
txtMoby =request.querystring("Mobile Telephone")
dim txtemail
txtemail =request.querystring("email")
dim txtFee
txtFee =request.querystring("Fee")
set conn=server.CreateObject("ADODB.connection")
conn.Open "DRIVER=Microsoft Access Driver (*.mdb) ; DBQ=" & Server.MapPath("HeenaA")
set rs = server.CreateObject ("ADODB.Recordset")
strQ = "Select * from webBooking"
msgbox("ok")
rs.Open strQ, conn, adOpenDynamic, adLockOptimistic, adCmdText
rs.AddNew
rs("surname")= txtsurname
rs("initials")= txtinitials
rs("Address1")= txtAdd1
rs("Address2")= txtAdd2
rs("City")= txtcity
rs("PostCode")= txtpost
rs("HomeTelephone")= txtHmphone
rs("MobileTelephone")= txtMoby
rs("email")=txtemail
rs("Fee")= txtFee
rs.Update
rs.Close
response.write "Record added"
Conn.close
%>
any help appreciated
if at first you don't succeed, drink the rest of the bottle and loop to the same place tomorrow
-
Dec 7th, 2001, 07:25 PM
#2
Frenzied Member
whats the error your gtting?
or whats happening?
-
Dec 7th, 2001, 09:02 PM
#3
Good Ol' Platypus
Aha! You can't just double-click ASP files. The "server" must process them. Do you have IIS or PWS? If you don't you're out of luck until you get one of them (IIS for NT/2k/XP, PWS for 98/ME). Once you have it in your InetPub/WWWRoot/ directory, you can access the files like this:
C:\Inetpub\wwwroot\test.asp = http://localhost/test.asp
C:\Inetpub\wwwroot\mydir\2nddir\test.asp = http://localhost/mydir/2nddir/test.asp
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|