Re: Database help/advice
by "Eric Anderson" <blainesoft(at)hotmail.com>
|
Date: |
Tue, 04 Jan 2000 10:02:33 EST |
To: |
danswartz(at)pieinc.com, hwg-techniques(at)hwg.org |
|
todo: View
Thread,
Original
|
|
I think you're going to find this is more complicated than you might
imagine. However...
You have several options. You'll have to use either ASP or possibly
ColdFusion to get to an Access database.
I can't comment on ColdFusion, since I don't use it. However, Allaire has a
version of ColdFusion Express that's free on their web site
(http://www.allaire.com) and might show you how to do it from ColdFusion.
If interland.net supports ASP, here's one way to do it in ASP:
1) Ask your ISP to create an ODBC DSN connection. You can call this anything
you want, we'll use pieinc. This DSN connection will need to point to where
your Access database resides. A DSN connection is easier for a novice than a
DSN-less connection. Make sure the ISP also gives you write permission on
the database itself.
2) You create an ASP page. This ASP page is the one being called by the post
method in your form. The page will look something like this:
<% @language=VBScript %>
<%
set conn = server.createobject("ADODB.connection")
conn.open "pieinc"
' this connects to the database
set rs = server.createobject("adodb.recordset")
rs.open "mytable", conn, 2, 2
' where mytable is the name of your table in the database
' this "connects" to the table in your database
rs.addnew ' creates a new record in that database/table
rs("firstname") = request.form("firstname")
' where rs("XXXX") is the name of the field in the database and
' request.form("XXXXX") is the name of the input field from your form
' repeat this for every input field...
rs.update
' adds the record
rs.close
'closes the recordset (i.e. table in this case)
conn.close
'closes the connection
%>
Wrox Press has an excellent book called Beginning ASP Programming that I
would recommend.
Eric Anderson
Blaine Software
http://www.blainesoft.com
>From: "Daniel B. Swartz, Ph.D., CI, CT" <danswartz(at)pieinc.com>
>To: <hwg-techniques(at)hwg.org>
>Subject: Database help/advice
>Date: Tue, 4 Jan 2000 05:47:18 -0600
>
>Hello Everyone,
>
>I would like to learn how to adapt a form so that it dumps information
>collected into a database (Access).
>
>The form, with no script written for handling, and is not "submit ready,"
>can be found at http://www.pieinc.com/registration.htm
>
>I have already designed the form and the database. I just need to know how
>to make the "dump" happen. It is not so much a thing where I need browsers
>to have access to this database - I just want the form to dump the
>registration information to the database so that I can access it.
>
>I use FP2000 pretty much - I am kind of html "stupid."
>
>The site that I am putting the form on uses CGI and Cold Fusion, if that
>helps.
>
>A fellow did a form like this a couple of years ago that was really neat.
>It took the data collected and put it on a resident database on my site.
>Then I would just go to this webpage he set up and I could download the
>database to my desktop from there - it was great.
>
>Now if I just learn how to do this myself...
>
>Help, anyone? Also have limited budget to have someone else do this work.
>
>Thanks,
>
>
>
>Dan
>
>Daniel B. Swartz, Ph.D., CI, CT
>Executive Director
>Professional Interpreter Exchange, Inc.
>"Premier Providers of Sign & Spoken Language Interpreters"
>9101 Cherry Lane, Suite 104
>Laurel, MD 20708-1150 USA
>
>301-725-3402
>301-725-3404 TTY
>301-725-3412 FAX
>
>danswartz(at)pieinc.com
>www.pieinc.com
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA