ok first tutorial sailed through, the next one adding brings back a 500 internal server error ???? this is my code for the adapted "Add_to_comments.asp" page my page is called "add_to_exhibitor_cat_entr
Main Topics
Browse All TopicsI have a website which has been built and i am working on the next stage, but all this is new to me Please see http://eurobusxpo.com, within the exhibitors section i would like to add another tab (which i can do easily ) that opens a new page, and on that i would like there to be a form in which exhibitors can fill out with their information, this needs to be stored in a access database :
Contact Name:
Contact Email:
Company Name:
Tel:
Fax:
Website:
General email address:
Company Description (no more than 50 words max)
Member of CPT - (Tick Box)
All info here will be required before sending and needs to be sent to the access database and a copy emailed to an administrators email address internally and then also to the person that has entered the information ! I would also like it if there is some way in which this page could not get spammed . . .
As i have not done database connections nor pages before i am trying to find a step by step walkthrough to enable me to get this done . . . . YESTERDAY !
Can anyone help me ??
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The error 500 message is not very helpful: it could have lots of causes.
You will find at
http://classicasp.aspfaq.c
a parameter setting to help your IE to display a more meaningfule message.
OTHER:
- check what is the database contente, even if adding generated errors
- what is the primary key field in your table? would your test data creat a problem for that?
- test filling in your records just name, email and any primary key; if that workds, you can concntrate on the others.
Unless you _need_ XML I wouldn't complicate matters with it.
You say you have managed to get it updating. How are you doing this? If it is a form that populated the fields with database info for the user to edit and then click save (or similar) then the 'display' page will be pretty similar - just write the info to the page.
If, however, you don't actually have a way to edit then I here's how in pseudo code.
Open a connection to the database
define your sql statement
set your recordset object with the results of the sql query
Use getrows() to pull the info from the recordset into an array
close the database
What you will have then is an array with all the info in. This will always be a 2D array whether only one records are retrieved or many.
If you want to display a list then create a table with 2 rows: the first for the column headers and a second inside a for loop that will loop through your content array and display the appropriate info.
Of, if you just want to display one record then create a table or whatever layout you wish to use, then simply response.write() the bits of the array you wish to display to the user.
This is usually the line that is something like:
'Set the lock type so that the record is locked by ADO when it is updated
rsAddcatalogueentry.LockTy
Try setting the locktype to 2 or if that doesn't work try -1 :)
Don't use 1 (that's read only) or 4 (for batch updates)
Another one that catches people out when using Access is this:
The database MUST be editable by the user set in your web server
To clarify:
Whenever a file is requested from a web server that file will be accessed by a window user account. By default, IIS creates a user called IUSR_MACHINENAME (where MACHINENAME is the 'name' of your pc/server etc).
By default this user is a member of guests and can't log on.
So, this user needs to have read access to the files your web server needs to dish out.
If accessing an Access database it therefore also needs permission to read it. And, if you want to write to the database, it needs permission to edit it too.
If using IIS, open it, find your site in the list on the left, right click it and click Properties. Under the Directory Security tab click the Edit button next to Authentication and Access Control.
If hte user is "IUSR_servername" then that's fine, click cancel to close all the windows.
Next, go to the folder where the database is, right click it and hit properties.
Click the security tab.
If the IUSR_servername IS on the list make sure it is CHECKED under ALLOW and next to Modify. If not, check it and hit APPLY. Then, while this window is open, click ADVANCED.
Uncheck the "Inherit from parent blah blah blah" and check the "Replace permission entries blah blah blah".
What this will do is make sure that the web user has access to the database and can write to it.
Then give it another go.
(Usually when setting up a site all this security stuff is part of it. But if you're new to DB driven sites there can be several little things like this that get in the way. But once you know 'em you're off!)
good luck :)
Ok I have now managed to get the form online but am getting an error about where the database is held :Server.MapPath() error 'ASP 0172 : 80004005'
Invalid Path
/company_info.asp, line 17
The Path parameter for the MapPath method must be a virtual path. A physical path was used.
i have the included code on this line, what have i done wrong ????
Server.MapPath("d:\custome
is the problem.
If you know the path (which you do) then don't bother with Server.MapPath. This is usually only used when you don't know the "actual" path to the DB file such as when it's hosted on a shared server.
Just use:
adoCon.Open "Provider=Microsoft.Jet.OL
Better still, create a common include file and in it stick a variable called ConnString or something similar. Then assign it "Provider=Microsoft.Jet.OL
Use SSI to include this common file on every page then you only need to do:
adoCon.Open ConnString
So, if the database path ever changes (moving server etc) all you need to do is change one file - the include file - instead of having to update every page on the site.
Business Accounts
Answer for Membership
by: fiboPosted on 2008-04-11 at 03:00:33ID: 21332621
If it needs to be done by yesterday, just focus on the database thing and forget emails for the time being.
/kb/asp_tu torials/ co nnecting_t o_a_databa se.asp
Concentrate also on filtering input data so that it does not generate wrong data or safety holes.
Using your form with POST type, clicking on the 'submit' button will lead you to the "database writing" page, where you will get back the POSTed data and filer it, then add the corresponding record.
Spend 30 minutes reading and implementing the tutorial at
http://www.webwizguide.com
then use your newly-gained knowledge to finish your project.
Again, don't try to do everything at once. What you need first is really to get this database up and running (let's say this is version 0.99). Sending by mail will be done calmly at a later stage, as part of a 1.01 version/