Forum Moderators: phranque

Message Too Old, No Replies

Access databases

In at the deep end, what's going on?

         

WibbleWobble

1:26 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



So. We're in need of a database that can hold product information and pull it to an html (or whatever) template. I have no clue as to how to go about this.

We're using Access, because we're newbies and it seems good enough for the job in hand (relatively small database). I've managed to get a table with the relevant fields all done, but now I'm really baffled, lost, and generally confused.
I'm guessing I need somesort of query strings to pull information, and I need somesort of ASP/CGI/Something script to make use of the query/table and publish it to the internet.

If anyone would care to run me through the basics of what I'm doing, what scripting I need etc, I'd be most grateful. Or if there are any useful tutorials out there, that'd be useful, too. I've googled for help, and looked at the Access help file, but its all so over-my-head.

(I realise this is all pretty general and vague, but this is the level I'm at, unfortunately)

Do I need ODBC? ASP? Queries? I'm clutching at straws.

Andrew Thomas

1:57 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



Basically you need to set up an ODBC connections on your server first.

Goto Control panel, settings, administrative tools, ODBC - define where the database is and give it a DSN name.

I use dreamweaver to set up connections, recordsets etc. Its pretty easy once you do it a few times.

If you use dreamwevar i can walk you through the rest, let me know

Andy

SuzyUK

3:21 pm on Jan 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ASP (Active Server Pages) written in VBscript (or Javascript) can use Access Databases, and you need a windows host..

You will come across SQL (Structured Query Language)too..but Access does that for you so you set up your queries in Access and then use a simple SQL select statement.

Suzy

WibbleWobble

4:17 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



I've spent most of the day fiddling with access, and a few ASP tutorials. I've come to a bold conclusion: databases are evil.

Anyway. I've got as far as pulling a table's contents from a database to an HTML page, which is all fine and dandy, but do I have to then create a new table for each product's information etc? I can't imagine this being the case, but I still don't know what half the commands I've used actually do, so I'm on a steep curve of understanding. (The code that I'm working from is a guestbook tutorial, but the basic principle of acquiring data is the same, sort of.)

Anyway, what I'm trying to do now is have a table containing multiple columns and rows of entries/text, but only pull one row* per page, as I want the database to hold prices, names, text etc. Which is harder. Anyone shine some light, some single line of code that'll make my life easier? No? :/

Alas, I'm not using dreamweaver. I'm handcoding the asp/html in Topstyle, and obviously, the database in Access.

Sigh, I fear its a long road, full of bumbling old men and paths that don't go where they should.

*each row = all fields, each column = individual field

Thanks.

aspdaddy

4:51 pm on Jan 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



WW,
It might help to design a single product page, which you can pass any product id to and it will query the db using the id e.g

select * from products where id=" & request("id")

WibbleWobble

5:03 pm on Jan 31, 2003 (gmt 0)

10+ Year Member



This was the general idea of the site anyway, though I had no idea how to implement it until a moment ago (looking at w3schools and this thread at the same time).

I'm still not entirely sure of how to do everything I want, but I'm getting there with your help, and google's.
I'll come at it fresh on monday, and see what the day brings. Hopefully it'll bring enlightenment, and ability.

(Thanks aspdaddy, your snippet makes more sense than w3schools' one. Heh)