Web based database access?

Posted by: Xterrian

Web based database access? - 10/01/05 10:14 PM

What's the easiest way to access a database from a webpage? I used Cold Fusion before, but the unit I'm in now won't go for it. I need something that's free or very cheap so I can write webpage forms to see the data and up date it. Any suggestions? I'm using an Access database. I'm thinking XML, but I need an example to alter and make my own. It's a pretty simple database with only one table. I want it so I can make a form where the user gives a password and has the ability to select from the records to update the fields. The webpage and database would be in a folder on a server on our intranet. No outside access would be available. Just the users with access to the folder. It would be nice if the user had limited access to records that only pertain to their group. I'm getting a headache trying to figure out how to do this without Cold Fusion. It was so simple to use.
Posted by: Anonymous

Re: Web based database access? - 11/01/05 08:49 AM

Have you tried using MySql...?
Posted by: jorge

Re: Web based database access? - 11/01/05 09:11 AM

PHP if you're using a Unix machine, ASP on a Windows.

Both can read/write directly to Access DBs.
Posted by: BoneCrusher

Re: Web based database access? - 11/01/05 12:38 PM

If your familiar with Java you can use the JDBC driver to access and control a databse through java. Not sure if that helps or not but thats how i do it.
Posted by: 2001frontier

Re: Web based database access? - 11/01/05 12:58 PM

If you want simple, and have a newer version of access, you can create web forms in it to access the data with. If it is a simple app this should work fine.
Posted by: Xterrian

Re: Web based database access? - 11/01/05 08:03 PM

I'll try the suggestions. I can't use ASP at the moment. The server isn't set up to run them, but I may be able to convince them to activate it since that shouldn't cost anything.
Posted by: Todrick

Re: Web based database access? - 12/01/05 08:31 AM

php

if the server is not "set up" for asp then it sounds like a *nix box, php is the way to go in that instance.
Posted by: Xterrian

Re: Web based database access? - 12/01/05 05:58 PM

Todrick, you over estimate the intelligence of the Army computer geeks. Not smart enough for Unix. Pretty sure it's NT, but I could be wrong.
Posted by: Xterrian

Re: Web based database access? - 16/01/05 10:22 PM

Can anyone suggest a basic tutorial for MySQL and PHP? The database and webpages won't be on the actual internet. They will be in a folder on the server and accessed there. Everytime I click on an asp page on the server it opens Frontpage instead of IE. I don't know diddly about php or MySQL. I need a website that tells me how they work from the most basic level. I hope I don't have too much trouble doing this. I wrote my first app in Cold Fusion the first weekend I got it. It was very easy. Hopefully these other two aren't much harder to pick up. Thanks!
Posted by: jorge

Re: Web based database access? - 17/01/05 04:23 AM

Here yar go:
http://webmonkey.wired.com/webmonkey/01/48/index2a.html?tw=programming
Posted by: Coop

Re: Web based database access? - 17/01/05 12:07 PM

Quote:
Originally posted by Xterrian:
Can anyone suggest a basic tutorial for MySQL and PHP? The database and webpages won't be on the actual internet. They will be in a folder on the server and accessed there. Everytime I click on an asp page on the server it opens Frontpage instead of IE. I don't know diddly about php or MySQL. I need a website that tells me how they work from the most basic level. I hope I don't have too much trouble doing this. I wrote my first app in Cold Fusion the first weekend I got it. It was very easy. Hopefully these other two aren't much harder to pick up. Thanks!
The reason you're having problems with ASP pages opening in frontpage instead of IE, is ASP pages must be served up by a IIS or another web server with ASP processing cabability. You cannot directly open them with IE, they have to be processed by the server to work.

A very highlevel overview is this... When you write an ASP page, you enclose the ASP code in <% %> tags, which can be intermixed with standard HTML...
Code:
<HTML>
  <HEAD><TITLE>EXAMPLE</TITLE></HEAD>
  <BODY>
    <%
      Dim sHello
      sHello = "Hello World!"
      Response.Write "<B>" & sHello & "</B>"
    %>
  </BODY>
</HTML>
When the webserver gets the request for this file, it knows to process it with the ASP engine, which looks for the <% %> tags, processes the contents, and generates the output, which should be pure HTML... What results would be this, no more ASP code.

Code:
<HTML>
  <HEAD><TITLE>EXAMPLE</TITLE></HEAD>
  <BODY>
    <B>Hello World!</B>
  </BODY>
</HTML>
PHP (and coldfusion for that matter) work very much in the same way. You will be required to be running a webserver on the machine to serve up the files, and won't be able to just go into a folder to open them.

PHP is pretty easy to learn with cold fusion experience. Setting up connections to your DB is a bit more work because they aren't defined at the server level like in coldfusion, they have to be defined in each page. You also use more standard for or while loops when working with returns from your querys instead of the tag.

If you're continuing to use Access, you won't use MySQL. MySQL is a database, like Access is. It's a very good free DB, but does not have the same pretty desktop interface that Access has. Unless you're willing to move your DB to MySQL and re-engineer your forms, macros and reports in PHP, MySQL isn't part of the equation for you.
Posted by: Xterrian

Re: Web based database access? - 20/01/05 10:33 PM

Thanks Coop, your answer was just what I was looking for. I always RTFM, but I like to know if it's going to be worth it before I go through the trouble. Web based access just isn't going to work in this case. The guys that run the server are pretty tight assed when it comes to making the stuff on it accessable to the average Army user. I guess they're protecting their jobs or something. They always yell, "Security", but I think they're a bit overzealous on simple things like this and too lax where it really counts. Anyway, I'm just going to write a form and some queries for each user and put it on the server with the DB. Much less headache if not as cool and user friendly for my end users. Hopefully I will be able to convince them all not to screw up the DB too much. Thanks for all the answers!