Solved

Link a web to a database

Posted on 1998-09-08
5
165 Views
Last Modified: 2013-12-25
I'm rather new in web authoring. I can make pages quite easily, through authoring programs and the HTML I've learned so far. But now I have to go deeper: I can't write 500 html pages for 500 different objects I have to list. I will make only one page linked to a Database that contains those 500 objects. The problem is that I don't know where to begin my job, what software I need ( I have MS Access 95 ) and how can I link my website to that database. I have to know everything. For this reason I will high-rate this question.
Thank you!
0
Comment
Question by:paolobeltrami
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 2

Accepted Solution

by:
englishman earned 500 total points
ID: 1854807
I'm fairly new to coding too however this is what you need:

Install MS Personal Web Server and asp.exe .
Give your dbase a System DSN in 32bit ODBC in control panel.
Create an executable directory.
In this directory put the following two files:

search.asp
(this file is used to provide the criteria by which you select the records to display)
<form method="post" action="results.asp">
Keyword: <input  type="text" name="Keywords" size="20">
<input type="submit" value="Search"><input
type="reset" value="Reset"></form>

results.asp
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
Keywords = Request.form("Keywords")
q = "SELECT * FROM tablename WHERE fieldname LIKE '%" &_Keywords & "%'
rs.Open q, "DSN=dsnname;", 3
%>
<%=rs("field1")%><BR>
<%=rs("field2")%><BR>
<%=rs("field3")%><BR>
<%=rs("field4")%><BR>

0
 

Author Comment

by:paolobeltrami
ID: 1854808
(TO ENGLISHMAN)
Thank you for answering.
I'll take into consideration your effort, but before answering I prefer receive some more comments.


0
 
LVL 2

Expert Comment

by:vendrig
ID: 1854809
What Englishman is trying to say, you need:
1. A Web-server. Personal Web-server is excellent for prototyping in Windows95 (and it is fully operatinal) but not intended for the real thing. If you have Windows NT there are a number of options, such as MS's Internet Information Server. Most people however forget that they have nothing to say about this, they depend on their ISP.
2. A scripting language environment. The ASP Englishman is talking about (Active Server Pages of MS) is a good example. CGI is the old-fashioned way. I've also used ColdFusion (easy to use but not so flexible). These environments require extensions on your Web-server, so it depends which you can use.
3. Connection from the scripting environment to your database. (Depends on 1 and 2 again.) With Access you can do a good job, if your database is not too big (500 items doesn't sound too big). In Englishman's example you can see how the scripting language (he uses server-side VBScript, everything between <% %>) connects to the database (via an ActiveX component) and performs a SQL query.

The case Englishman has given looks too easy to be true. But it is:-) An experimental environment is not that hard to set up. The nightmares come when you have a real site with real users who do everything you didn't think of.
0
 
LVL 2

Expert Comment

by:englishman
ID: 1854810
hi P and V,
I'm using access with a table of 20000 records and it works a treat (intranet only so far). I've heard that MSaccess only really becomes a problem when you have users writing to the dbase, though I haven't tried this. Of course the example I posted is the simplest senario.
Cheers.
0
 
LVL 28

Expert Comment

by:sybe
ID: 1854811
vendrig's comments are very usefull.

It depends on what system you currently have. With WinNt and IIS, it is simple to install ASP (ASP comes automatically with IIS4, if you use IIS3, you have to install it seperately).

It also very much depends on what your current knowledge is and how fast you learn. If you are familiar with HTML and VB, then you will find ASP (with VBScript) quite easy to learn.

Quite a good tool for developing ASP pages without having to do much coding is DrumBeat. I have seen people with only some HTML produce database driven web applications without too much effort.
DrumBeat produces JavaScript ASP.

To explain this: ASP can use different scripting languages. Standard it can handle VBScript and Javascript. But also Perlscript can be installed. I haven't seen other languages, but maybe there are.


0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question