Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Link a web to a database

Posted on 1998-09-08
5
Medium Priority
?
169 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
5 Comments
 
LVL 2

Accepted Solution

by:
englishman earned 1500 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

885 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