navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Input Form to Database

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Input Form to Database
Page: [1] 2   next >   >>
 
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
Input Form to Database - 9/16/2004 8:29:39   
Hi All,
I am assisting a friend in a web site which has gone pretty good up til now. We have our DRW pages displaying results like they should be. However, when we create an "Input Form" for users to input their information to be stored in the database it doesn't work. We have gone through all the neccessary steps and even get a confirmation when we try it online. But when we open up the database on the server there are no new entries. Are we missing something???

Also can anyone direct us to a tutorial or have an answer on how to upload images to a database using the DRW?

All assistance is greatly appreciated. Thank You
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/16/2004 13:19:49   
Welcome to OutFront!

As far as the database not updating with the new record, I would first check permissions on the fpdb folder. The IUSR_ComputerName account must have read, write and delete permissions. As for the upload question, what version of FP do you use? Seems to me that later versions have an upload component included.

http://support.microsoft.com/default.aspx?kbid=299763&product=fp2002

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/16/2004 13:24:35   
Thank YOu sooo much Duane. We are using Frontpage 2003 and Access 2003.........would love to resolve this and learn from it.

(in reply to BeTheBall)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
Will Pay to get accomplished - 9/16/2004 17:31:58   
I got this link from Microsoft about the upload feature in 2003. http://support.microsoft.com/?kbid=299763..........I understand the procedure about selecting the folder to store the uploaded image...........BUT "How do I tell the database (Access) to store the file path in the "Photo" field of the table so that it points to that directory??. So that the image will show when the drw displays results

I will pay for any assistance in this project for I am eager not only to get this accomplished but to also learn a great deal about web development. I have learned tons from this forum just browsing already. I hope someone is willing to step up :)

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
Anyone?? - 9/17/2004 10:48:08   
Just wanted to have this surface again one more time. Willing to pay for any assistance or time involved. Very important to complete and also learn.

(in reply to rhonda S)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Anyone?? - 9/17/2004 17:32:12   
Hi Rhonda. I still haven't upgraded from FP 2000, so can't test the upload component for you. here is a link to another MS article that seems promising. Download the file and then double-click it once downloaded to extract the article.

Hope it helps.

_____________________________

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.

(in reply to rhonda S)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Anyone?? - 9/17/2004 17:49:32   
Oops, forgot the link:

http://support.microsoft.com/default.aspx?scid=kb;en-us;288328

_____________________________

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.

(in reply to BeTheBall)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
ALMOST THERE - 9/19/2004 22:05:37   
Duane,

Thank you for the article..............I did everything in the article.........and I am almost there.........when I fill out the form page and then submit it, it fails on the process1.asp page with the following code:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/process1.asp, line 9

However, the entires DO turn up in the text_results.txt page but DO NOT get entered into the Access form database. therefore, I cannot create criteria for users to search from the database.

Does anyone know why the Access database doesn't store the info but the text file does......and does anyone know about the error message above???.......could that be preventing the storage to the database??......Thanks Guys

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: ALMOST THERE - 9/19/2004 22:11:23   
So the upload portion is working?

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: ALMOST THERE - 9/19/2004 22:25:02   
Yes the upload portion is working.......the image does get stored in the directory that I specified.........BUT WHY DOESN'T IT WRITE TO THE ACCESS DATABASE only to the form_results.txt file???.............everything would be fine if that worked......like I said, I'm Almost there........but not quite...........and thanks to you for getting me this far:)

(in reply to BeTheBall)
wilbilj

 

Posts: 49
Joined: 2/19/2004
Status: offline

 
RE: Input Form to Database - 9/19/2004 23:48:38   
here is a helpful site that should get you up and running:
http://www.frontpagemagic.com/DRW/Index.htm

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 9:06:48   
Thanks will, but that article isn't going to help me with my problem. I do however thank you for your efforts in reading my post and trying to find a solution. I'm still trying to figure out why it isn't writing to the Access table but writing to the text file.

(in reply to wilbilj)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 11:35:35   
Can you post your code for process1.asp?

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 12:14:34   
Here it is Duane, I hope you can make something of it:), I can't tell you enough of how thankful I am of your time and assistance.

<html>

<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open Application("text_ConnectionString")
Set RS=Conn.Execute ("SELECT * From form_results2.txt")
Dim iCnt
Do Until RS.EOF
ICnt=iCnt + 1
Name = RS("Name")
Email = RS("Email")
Comments = RS("Comments")
File = RS("File")
RS.MoveNext
Loop
RS.Close
Conn.Close
%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
</head>

<body>

<form method="POST" action="Process2.asp">
<p><input type="text" name="Name" size="20" value="<%=Name%>"></p>
<p><input type="text" name="Email" size="20" value="<%=Email%>"></p>
<p><input type="text" name="Comments" size="20" value="<%=Comments%>"></p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
<input type="hidden" name="File" value="<%=File%>">
</form>

</body>

</html>

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 14:19:47   
quote:

However, the entires DO turn up in the text_results.txt page but DO NOT get entered into the Access form database. therefore, I cannot create criteria for users to search from the database.


If the results are going to text_results.txt and your code is trying to pull from form.results2.txt, then that would account for there error you are getting. Make sure that the page you are submitting to is the exact same as the page identified in this line of process1.asp:

Set RS=Conn.Execute ("SELECT * From form_results2.txt")

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 14:27:28   
Duane,

form_results2.txt is the correct file......I just was using the phrase text file. I already had a form_results.txt file and didn't want to mess that one up.........so I created a new one........all coding and selections through the whole process I am using form_results2.txt which is showing all the entries when iputting data via the form but not the Database. Sorry, I guess I should have mentioned that. Please forgive :)

I am still at a loss at this..........it is driving me up a WALLLLLLLLLLLLLLLLLL. could this have something to do with Windows 2003 Server??

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 14:46:22   
quote:

could this have something to do with Windows 2003 Server??


I don't think so. The error you are getting is triggered when you are writing something to the page, like: <%=Name%>, but the code cannot find a value for Name. I sent you an email via the forum asking you to email me a copy of form_results2.txt. Check for that message. (Your email provider may think that messages from the forum are bulk, so check your bulk/junk email folder).

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 14:59:09   
Oh Duaneeeeeeee,

I checked the Schema.ini file that the report asked me to create right off the back.........and wouldn't ya know I spelled "results"........"RSEults".....ohhhhhhhhhhhh myyyyyy my...........but your post made me think to myself that I better go back and check all things...........now the process1.asp page is working but I get a message on process2.asp

.......Description: [Microsoft][ODBC Microsoft Access Driver] Field 'Results.File' cannot be a zero-length string.
Number: -2147467259 (0x80004005)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 15:05:31   
Ahh, you are getting very close. Go throught the process again and when process1.asp load, click view source. Scroll through the source code and make sure that your hidden field, File, has a value.

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 17:00:09   
<input TYPE="hidden" NAME="_charset_" VALUE="windows-1252".

I swear when this works you will know before I post it becuase your gonna hear a
SCREEEEEAAAAAAAAAAAAAAAAMMMMMMMMMMMMM of joy

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 17:43:27   
quote:

<input TYPE="hidden" NAME="_charset_" VALUE="windows-1252"


:)

Something went wrong somewhere. Post your code for Form.htm and repost your current code for process1.asp.

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 17:56:37   
Hi Duane,
Here they both are, curious though, when I input information into the form fileds on form.htm and then hit submit, it goes through process1 then process 2 shows up on the screen with 3 text boxes, 2 of which are empty but the first one which is "Name" contains the path of my selected image for the File field. Let me know if it will be easier for you to just go to these pages on the web (test pages) so you can see for yourself.....Thanks Hon, your a diamond in the ruff

input.htm

<form method="POST" enctype="multipart/form-data" action="_vti_bin/shtml.dll/Form.htm" webbot-action="--WEBBOT-SELF--">
<!--webbot bot="FileUpload" U-File="_private/Form_results2.txt" S-Format="TEXT/PRE" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE" S-Email-Format="TEXT/PRE" S-Email-Address="rhondaskillman@yahoo.com" B-Email-Label-Fields="TRUE" S-Destination="Files/" S-Category S-Assignedto S-ReviewStatus B-Process-MetaInfo="FALSE" S-Builtin-Fields S-Form-Fields="Name Email Comments File " U-Confirmation-Url="confirmation.htm" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><input TYPE="hidden" NAME="_charset_" VALUE="windows-1252"><!--webbot bot="FileUpload" i-checksum="58985" endspan -->
<p><input type="text" name="Name" size="20"> </p>
<p><input type="text" name="Email" size="20"></p>
<p><input type="text" name="Comments" size="20"></p>
<p><input type="file" name="File" size="20"></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>



process1.asp

<form method="POST" action="Process2.asp">
<p><input type="text" name="Name" size="20" value="File: http://www.flyers.com/Files/realdeal.gif"></p>
<p><input type="text" name="Email" size="20" value=""></p>
<p><input type="text" name="Comments" size="20" value=""></p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
<input type="hidden" name="File" value="">
</form>

</body>

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 18:21:25   
quote:

<input TYPE="hidden" NAME="_charset_" VALUE="windows-1252"


That looks more like what you would see if you did "View - Source" on Form.htm, not on process1.asp. Please try one more time. Go to form.htm in your browser. Complete it and submit. When you do, if everything is working right, you should then go to process1.asp where you will see the second form. On that page, please go into Internet Explorer and choose: View - Source and then copy and paste the code here.

_____________________________

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.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 20:27:05   
The only file I can't check thoroughly at home is form.htm because I only have FP 2000. Verify 2 things for me. Open Form.htm, right-click the form, and choose Form properties. Click the File Results tab and make sure the File format is set to:

Text database using comma as separator.

Then, click the Saved Fields tab and delete all fields in the list except:

Name
Email
Comments
File

Then resave the form and test again.

_____________________________

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.

(in reply to BeTheBall)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 20:58:42   
Duane,
Making progress you life saver you!......your suggestion worked and I receive confirmation that the data was inputted. However, it still only goes to the form_results2.txt file. But still Nothing in the Access Database Table..........that is the only thing left..........can WE get there??????. Oh please please please can we get there.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 21:19:59   
No error message?

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 21:25:52   
Nope, No Error message, just confirmation. Try it and see

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/20/2004 21:32:42   
No, something's still not right. Now it isn't directing to confirmation.htm, but rather the FrontPage default confirmation is coming up. When you open the page and see:

[FileUpload]

That's not a good sign.

Once again, right-click the form and choose form properties. Go through all the tabs and make sure the settings are correct. Make sure the results are posting to form_results2.txt. Verify the confirmation page. Go to the upload tab and make sure the upload folder is still entered. And once again make sure only the four fields I mentioned are being submitted.

It is very common that when you open a form in FP, that the settings kind of undo themselves. I think (hope) that your other pages are correct. I just think we need to get form.htm to behave itself.

_____________________________

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.

(in reply to rhonda S)
rhonda S

 

Posts: 17
Joined: 9/16/2004
Status: offline

 
RE: Input Form to Database - 9/20/2004 21:43:10   
Your right Duane, I should have known that was the basic confirmation page, I just got a little over excited I guess. After checking the form properties and setting them, I submit the data and it stops at the process1.asp page and forces the user to submit again which generates the following error:


Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Field 'Results.File' cannot be a zero-length string.
Number: -2147467259 (0x80004005)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query.

It seems to stop at process1.asp again. forcing the user to submit once again

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Input Form to Database - 9/21/2004 0:06:56   
The problem is because the file path is entered into a field that is input type="file", instead of input type="text", the value is not entered into the text file. So, what we can do is insert a hidden field that with the help of some javascript will get the path. Find this line it Form.htm:

<p><input type="file" name="File" size="20"></p>

Replace it with:

<p><input type="file" name="Path" onchange="this.form.File.value=this.value;"></p>
<input type="hidden" name="File">

I had to get an assist with the javascript from:

http://www.webdeveloper.com/forum/showthread.php?s=&postid=249260#post249260

See if that doesn't fix it.

As far as the user seeing a second form, that is the way it is designed. You will want to add some text to the second form to make it look like a confirmation type thing or something similar.

_____________________________

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.

(in reply to rhonda S)
Page:   [1] 2   next >   >>

All Forums >> Web Development >> ASP and Database >> Input Form to Database
Page: [1] 2   next >   >>
Jump to: 1





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