Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sample access to web pages 3

Status
Not open for further replies.

ski2sun

Technical User
Sep 12, 2001
31
0
0
US
does someone have a simple access db and pages that show how access can make web pages for a database scenario...like combo boxes - select state, go to next page/form, then city, go to facility listed...et al....I have tried using a tutorial about .asp, codes with ODBC connect, and try to make data pages but combos never work, or at least not the way I understand when doing forms....I need a very simple 1 - 2 - 3 on every step of the way...I always find someone assuming we know a certain part....I have set up ODBC...but none of my .asp pages showed up when uploaded...please someone help...I am really struggling just to get a basic...then otherwise, I can progress rapidly....Thank you please....
 
[tt]

ski2sum,

The best way to better understand\learn how to utilize an access, sql or any other database with ASP is to create a page up-to where you understand it then post your problem code in this forum so we can help you troubleshoot it with you.

[sup]
[sup]
Got ASP Error(s)? = [/sup]
 
[tt]

Could you be more specific as to what part of form you don't understand and we could probably help...
[sup]
[sup]
Got ASP Error(s)? = [/sup]
 
First...when I create a form where I expect combo boxes, they seem to disapper when I create data access pages via the wizard....
2nd...I followed the car db tuturial at about.com..I followed slowly, oh so slowly, this tutorial...I uploaded all the files provided in tutorial...and between Lesson 3 & 4...I got lost...nothing .asp appears as requested........the files are there...only the .inc files appear, but i didnt really understand their purpose, but did not understand where to paste these codes....
 
[tt]

No problem, just a few thing before we start[sup](We may have to continue into tomorrow) ;-)[/sup]

1. You need IIS to run your ASP pages
2. You must call your ASP pages not open them with the broser.[sup](This means that if you have your pages in a folder on the server and you have a page called default.asp and you type the page will display correctly}[/sup]
3. When using Access with ASP's do not program Access with combo boxes at all, all those bells and whistles will be done in HTML in your ASP.
4. Try sites like the ones below for reading:
[ul][li][/li] [li][/li][li][/li][li][/li][/ul]
[sup]
[sup]
Got ASP Error(s)? = [/sup]
 
I have written what I think is a very basic tutorial walk through for a guest book in ASP.
It may help you get going. I have yet to include editing the DB and I want to do report generations also. all to come soon.

starts here
Just a suggestion: faq183-874
admin@onpntwebdesigns.com
 
[tt]
FYI onpnt

I visited your site and rated it, but when I tried to access your Sign the Book link on the pop-up window. The page loaded within the pop-up and not the _parent
[sup]
[sup]
Got ASP Error(s)? = [/sup]
 
ouch!!! [lol]

thanks Tony. I think I'll go take care of that. ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
well that was the most irritating a simple task could have gotten. [wink]

Thanks again. A star for the kindness and help. ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
[tt]Thanks for the
star.gif
onptn, glad to help.

Hope ski2sun is doing some heavy reading by now...
[sup]
[sup]
Got ASP Error(s)? = [/sup]
 
thanks to everyone on my thread....however, we are still jumping head too much...I still dont know what IIS is...?i checked to see if I had the MDAC...this was ok...I have PWS but when loaded it messed up my outlook, needing msoe.dll missing....I use attbi....can someone please list if I can do this with free, simple add ins....
I cannot load PWC...my wife will shoot me if I try another stunt again..so again, with attbi broadband, first can you post .asp to my personal space? I have yet to see an .asp from one of my tutorials appear....what do I need for basic applications - PLEASE spell out application name, where I can get,,,,so help me someone.....
 
if this is now working as an htm, and I have the .asp in the folder I uploaded to, where does the guestbook.mdb now need to reside for this to collect the info submitted on the guest.htm page. Do i upload guestbook.mdb (it didnt work)....please help..what is missing component..an application?....thanks....

<%
dim cnn,rs
set cnn = Server.CreateObject(&quot;ADODB.Connection&quot;)
set rs = Server.CreateObject(&quot;ADODB.RecordSet&quot;)
cnn.Open &quot;driver={Microsoft Access Driver (*.mdb)};;DBQ=&quot; & Server.MapPath
(&quot;databases\guestbook.mdb&quot;)
sqltext = &quot;SELECT * FROM tblguest&quot;
rs.Open sqltext,cnn,3,3
dim nm, addr, com, day
nm = Request.Form(&quot;Name&quot;)
com = Request.Form(&quot;comments&quot;)
addr = Request.Form(&quot;EmailAddr&quot;)
day = Request.Form(&quot;Day&quot;)
rs.AddNew
rs(&quot;Name&quot;) = nm
rs(&quot;EmailAddr&quot;) = addr
rs(&quot;Comments&quot;) = com
rs(&quot;Date&quot;) = day
rs.update
Conn.Close
Set rs=Nothing
Set Conn=Nothing
Response.Redirect &quot;GuestEntries.asp&quot;
%>
 
here are some basics in dealing with ASP and databases
1) the databse needs to reside in a directory that has write permissions set to it. Something in the same terms as your cgi-bin will. so if needed create a directory called dbase. have the permissions set to read/write by either the service you have been supplied with or if you are running IIS in the properties -> permissions settings.

2) for this example you have three files.
a html page for data entry, a processing script (the one you posted above) and the page to view the records.
All of these files do not have to be in the same directory but for ease at this point put them in one directory (folder)

3) you need to ensure the paths in the scripts are valid.
so if you created a dbase directory (folder) to hold the database then the path in the connection string needs to be
&quot;driver={Microsoft Access Driver (*.mdb)};;DBQ=&quot; & Server.MapPath(&quot;dbase\guestbook.mdb&quot;)

4) name the tables and fields in the database accordingly to the script
table name = tblguest
field names = Name, EmailAddr, Comments, Date

5) now if you have done all this and copied the script exactly as is with the minor path changes it will or should work properly.

question
? how are you testing ? through IIS on your machine or uploading to a sever

---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top