Forum Moderators: coopster & phranque

Message Too Old, No Replies

Database for new site...HELP

newby looking for help in setting up database

         

DJinDecent

6:23 pm on Jun 11, 2001 (gmt 0)



Im new to this forum, but I just wanna say that it appears you guys are really helpful and it's great that it's free! Anyway, my problem is:

Im setting up a site that is for students (and the big selling point is that it is written BY students). one of the sections will have TV listings [because TV is very important to us Students :) ] and the best way I can think about doing it is to set up a database for the weeks television and then have the site dynamically display what is on for each channel (and don't worry, us Brits only get 5 channels!!). Ideally, I'd like to design the database in MSAccess, and then have someway of porting it to the web page.

I really have no idea where to start, I can get the database in access no problem, but where my problem lies is the challenge in getting it from Access to the web page. Any help at all will be hugely appreciated! Rich

rcjordan

6:27 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey DJ, welcome to WmW. Is the database just one table in Access?

DJinDecent

6:30 pm on Jun 11, 2001 (gmt 0)



Errm, it will be 1 database yes, with format like the following:

Channel, Time, Title, description

rcjordan

6:40 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most of the flatfile databases I work with on the web use a pipe-delimiter. DBman [gossamer-threads.com], for instance.

I haven't use Access in a while, but I used to export the database to a pipe-delimited flatfile, then upload that. I may have had to run it through Excel first.

DJinDecent

6:45 pm on Jun 11, 2001 (gmt 0)



The problem with dbman is that it's not freeware, at the moment we don't have the cash to pay for that, but Im quite willing to set up a pip-line database if that is what you recommend. What Im really after is a script which will get me from database to web, based on either what time it is - i.e. "whats on TV now" sort of thing, or selection by channel for the day, i.e. "whats on BBC1 today".

<aside>What is the ascii code for the pipe-line bar, and how do you get it on a keyboard</aside>

rcjordan

7:00 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like the pipe because I can read the file easier. I do much of my editing "straight" into the flatfile using a text editor. The pipe "¦", on my keyboard anyway, is above the "\".

Take a look at hotscripts [hotscripts.com]. Perhaps someone else has experience with a good free db script.

DJinDecent

7:07 pm on Jun 11, 2001 (gmt 0)



Im looking through hotscripts.com as we speak, but if Im being honest I don't mind getting my hands dirty. Do you recommend any other ideas?? PHP, XML? ASP? etc? All thoughts welcome. Rich

sugarkane

8:14 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Rich,
There's an example of some relevant perl code here [webmasterworld.com] that may be of use as a starting point.

agerhart

8:16 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use ASP for this, and it is actually very easy, but you have to make sure that you are able to use ASP.

DJinDecent

8:24 pm on Jun 11, 2001 (gmt 0)



I can use ASP on my server, so any chance you can give me an idea mate please.... do share you knowledge!! :) Rich

agerhart

8:27 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know if I am at will to hand over the scripts, as they are more the company's than mine, but I will help you in any other way that I can.

Have you written ASP before?

Using VB Script to write the ASP you can enter the data in the DB from an online form, then select it from the DB and have it form a table on a page specified.

DJinDecent

8:51 pm on Jun 11, 2001 (gmt 0)



Sadly, I've never written asp b4, but Im willing to learn.... is it a majorly big task Im getting myself into here?

agerhart

8:55 pm on Jun 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wouldn't say it is a majorly big task.....and actually there are scripts you can pick up for free at http://www.asp101.com [asp101.com]

I am pretty sure you will find some scripts that will be able to help you.

Xoc

9:29 am on Jun 12, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is an example of some ASP code that pulls some data from an Access database. It uses a stored query in the database called qryAcquiredWeb to get to the data.

Note: Access is not designed to handle high-volume pages. If you are getting more than a few simultaneous hits on the web page, it is not going to work.


<table>
<tr style="background-color:#CCCC99">
<th align="center">VIE Volume</th>
<th align="left">Collection</th>
<th align="left">Title</th>
<th align="center">Status</th>
</tr>
<%
Dim rst
Dim strSource
Dim lngRow

Const adCmdTable = 2
Set rst = Server.CreateObject("ADODB.RecordSet")
strSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/_private/jackvance.mdb") & ";Persist Security Info=False"
Call rst.Open("qryAcquiredWeb", strSource)
lngRow = 1
Do Until rst.EOF
If Not Response.IsClientConnected Then
Exit Do
End If
If lngRow Mod 2 = 0 Then
Call Response.Write("<tr style=""background-color:#b0c4de"">")
Else
Call Response.Write("<tr style=""background-color:#c0c0c0"">")
End If
Call Response.Write("<td align=""center"">" & rst.Fields.Item("Number").Value & "</td>")
Call Response.Write("<td><i>" & rst.Fields.Item("Collection").Value & "</i></td>")
Call Response.Write("<td>" & rst.Fields.Item("PublishedAs").Value & "</td>")
Call Response.Write("<td align=""center"">" & rst.Fields.Item("Status").Value & "</td>")
Call Response.Write("</tr>")
lngRow = lngRow + 1
Call Response.Flush()
rst.MoveNext
Loop
Call rst.close
Set rst = Nothing
%>
</table>


To see what this produces see [grr.xoc.net ].