|
| |
|
|
lakimaki
Posts: 7 Joined: 4/8/2005 Status: offline
|
Access db doesn't get updated - 4/18/2005 12:47:51
Hey guys, I've created a web form that writes the data into a Access db and it works perfect when I test in on localhost. On my local computer I have a folder named WebPage saved under root and inside this folder are all the required files. I also have a folder called fpdb under root where my access db is saved. However when I upload all the files to a web server everything works perfect except that the data from the web form never gets written into the db. I tried to save the db inside the same folder where all the other files are, I tried to create a separate folder called fpdb but it still doesn't work. It seems to me that I should save this db inside fpdb folder outside the folder where all the other files are but I am not allowed to do that. The funny thing is that the web form will never report any problem, it'll act as if it saved the data somewhere. Does this have anything to do with global.asa? Anyone has an idea how to fix this??? Thanks
|
|
|
|
dzirkelb1
Posts: 1321 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: Access db doesn't get updated - 4/18/2005 16:50:08
please post your code for the form and any pages it posts to
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Access db doesn't get updated - 4/18/2005 17:21:18
quote:
It seems to me that I should save this db inside fpdb folder outside the folder where all the other files are but I am not allowed to do that. What do you mean by "not allowed to do that"?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
lakimaki
Posts: 7 Joined: 4/8/2005 Status: offline
|
RE: Access db doesn't get updated - 4/18/2005 17:57:39
What do you mean by "not allowed to do that"? You see, when I test this on my computer I have a folder called SomeWebPage located under C:\Inetpub\wwwroot Now, inside this C:\Inetpub\wwwroot I have a global.asa file and I figured out that this is the file where I can actually specify the path of the db and it'll work perfect (at least it works on localhost). Now, I uploaded my website on www.websamba.com/somewebpage/ and I can only place this gloabal.asa under www.websamba.com/somewebpage/ and if I'm gonna follow the same pattern then I should place it outside the somewebpage folder or otherwise there will be no effect. I know this because I tried and I also have global.asa file inside SomeWebPage but it seems that whatever change I make to this file nothing happens. Here's the code of the page with the form: <%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Session.LCID = 1033
Err.Clear
strErrorUrl = ""
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear
Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record set"
fp_conn.Open Application("ScheduleAppointment_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"
fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"
fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record set to the database"
Dim arFormFields0(6)
Dim arFormDBFields0(6)
Dim arFormValues0(6)
arFormFields0(0) = "First_Name"
arFormDBFields0(0) = "First_Name"
arFormValues0(0) = Request("First_Name")
arFormFields0(1) = "Last_Name"
arFormDBFields0(1) = "Last_Name"
arFormValues0(1) = Request("Last_Name")
arFormFields0(2) = "Service"
arFormDBFields0(2) = "Service"
arFormValues0(2) = Request("Service")
arFormFields0(3) = "Time"
arFormDBFields0(3) = "Time"
arFormValues0(3) = Request("Time")
arFormFields0(4) = "Date"
arFormDBFields0(4) = "Date"
arFormValues0(4) = Request("Date")
arFormFields0(5) = "Address"
arFormDBFields0(5) = "Address"
arFormValues0(5) = Request("Address")
FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "Remote_computer_name"
End If
If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "Browser_type"
End If
FP_SaveFieldToDB fp_rs, Now, "Timestamp"
If Request.ServerVariables("REMOTE_USER") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
End If
fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"
fp_rs.Close
fp_conn.Close
FP_FormConfirmation "text/html; charset=windows-1252",_
"Form Confirmation",_
"Thank you for submitting the following information:",_
"ScheduleAppointment.asp",_
"Return to the form."
End If
End If
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Appointment Scheduler</title>
</head>
<body bgcolor="#CCCCCC" text="#000000" link="#4A5963" vlink="#4A5963" alink="#D3D3D3">
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" suggestedext="asp" u-asp-include-url="_fpclass/fpdbform.inc" s-dataconnection="ScheduleAppointment" s-recordsource="Results" u-database-url="fpdb/ScheduleAppointment1.mdb" s-builtin-fields="REMOTE_HOST HTTP_USER_AGENT Timestamp REMOTE_USER" s-builtin-dbfields="Remote_computer_name Browser_type Timestamp User_name" s-form-fields="First_Name Last_Name Service Time Date Address" s-form-dbfields="First_Name Last_Name Service Time Date Address" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="40548" --><p> </p>
<p align="center"><font color="#FF0000"><b>
<span style="background-color: #FFFFFF">CREATE AN APPOINTMENT</span></b></font></p>
<p> </p>
<table border="1" width="750">
<tr>
<blockquote>
<p> First Name: <input type="text" name="First_Name" size="30"> </p>
<p> Last Name: <input type="text" name="Last_Name" size="30"> </p>
<p> Address:
<input type="text" name="Address" size="30"> </p>
<p>
Date:
<input type="text" name="Date" size="30"></p>
<p>
Time: <select size="1" name="Time">
<option selected>8:00AM - 10:00AM</option>
<option>11:00AM - 1:00PM</option>
<option>2:00PM - 4:00PM</option>
<option>5:00PM - 7:00PM</option>
</select></p>
<p> Service:
<select size="1" name="Service" multiple>
<option>The Works</option>
<option>The Works Plus</option>
<option>Wheel Express</option>
<option>Soft Cloth</option>
<option>Complete Interior Detail</option>
<option>Complete Exterior Detail</option>
<option>Complete Detailing</option>
<option>Express Hand Wax</option>
<option>Interior Super Clean</option>
<option>Carpet Express</option>
<option>Upholstery Express</option>
</select> (Hold Ctrl for multiple services)</p>
</blockquote>
<p align="center"> </p>
<p align="center"><input type="submit" value="Submit" name="btnSubmit"><input type="reset" value="Reset" name="B2"></p>
<p align="center"> </p>
<p align="center"><a href="index.htm">Home</a></p>
<p align="center"> </p>
</tr>
</table>
</form>
</body>
</html>
< Message edited by Spooky -- 4/19/2005 18:53:26 >
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Access db doesn't get updated - 4/18/2005 18:24:45
quote:
Now, I uploaded my website Are you publishing your site via FP? If not, that may be a large part of your problem. Use FP's Publish command under "File". I do not recommend editing the global.asa page directly. FP will do that for you when you set up your connection. Anyway, FP will put databases in the fpdb folder by default and for best results that is where you leave them.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
lakimaki
Posts: 7 Joined: 4/8/2005 Status: offline
|
RE: Access db doesn't get updated - 4/18/2005 22:35:10
No, I didn't publish it through FP simply because I cannot do it for some reason. I can't publish nor I can open web location in FP. It gives me "The folder"....." isn't accessible. The folder may be located in an unvailable location, protected with a password, or the file name contains / or \" error. When I try to publish it gives me some long message "Unable to open server, possible causes...bla,bla,bla...."
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Access db doesn't get updated - 4/18/2005 23:17:47
Have you tried this: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q245025
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
lakimaki
Posts: 7 Joined: 4/8/2005 Status: offline
|
RE: Access db doesn't get updated - 4/19/2005 0:06:07
I haven't tried to istall that update but I'm afraid if I start installing it, it'll ask for the installation CD and I don't have one with me. What should I do?
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Access db doesn't get updated - 4/19/2005 14:30:20
I really think you are going to have nothing but headaches until you resolve the not being able to publish problem. Have you spoken with your host about it? You could probably get around it if you could open the site live, but sounds like that doesn't work for you either. You really need to have the db in the fpdb folder because you will need to ensure the folder where the db is has read, write and delete permissions. If the folder is simply in the root of the web and you assign those permissions, anyone will be able to edit your content. See the dilemma?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
lakimaki
Posts: 7 Joined: 4/8/2005 Status: offline
|
RE: Access db doesn't get updated - 4/19/2005 22:09:47
Well, thanks for the answers anyway. Does anyone know a free web host that supports both asp AND Front Page? Thanks,
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Access db doesn't get updated - 4/20/2005 10:14:02
quote:
ORIGINAL: lakimaki Well, thanks for the answers anyway. Does anyone know a free web host that supports both asp AND Front Page? Thanks, I don't, but these two are close to free and have been trouble-free for me: www.stokia.com www.parcom.net
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|