473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Access database and web pages , nubie problem!

rob
Hi to all.
I am pretty new to using Access and am having a problem I hope someone
can help me with.
I want to access a MS-Access database from a web page. I have managed
to get it "sort" of working using MS-Access's 'data access page'
function as it were.
This creates a web page that is linked to a database table. The
problem that
I have is that if data in the dbase is changed, it does not
immediately reflect
on the web page , you have to refresh the web page.
I don't have any sort of web site that this web page is on , I just
want to
run it of my machine at the moment. i.e double click on
c:\mywebpage.html and view the database.The dbase is also on the
machine. C:\mydbase.mdb
I found an article ' Creating dynamic web pages using Ms-access' , or
something like that , on the net , but I just can't seem to get this
thing working.
Any help would be appreciated.
Cheers
Rob
email: se*************@yahoo.com
Nov 12 '05 #1
5 7337
se*******@yahoo.com (rob) wrote in message news:<89**************************@posting.google. com>...
Hi to all.
I am pretty new to using Access and am having a problem I hope someone
can help me with.
I want to access a MS-Access database from a web page. I have managed
to get it "sort" of working using MS-Access's 'data access page'
function as it were.
This creates a web page that is linked to a database table. The
problem that
I have is that if data in the dbase is changed, it does not
immediately reflect
on the web page , you have to refresh the web page.
I don't have any sort of web site that this web page is on , I just
want to
run it of my machine at the moment. i.e double click on
c:\mywebpage.html and view the database.The dbase is also on the
machine. C:\mydbase.mdb
I found an article ' Creating dynamic web pages using Ms-access' , or
something like that , on the net , but I just can't seem to get this
thing working.
Any help would be appreciated.
Cheers
Rob
email: se*************@yahoo.com


You need to understand that web pages are normally stateless. If the
data changes underneath, and you need this reflected at once on the
web page, but you don't want the user constantly pressing F5 or
whatever, then you will need to push this.

Edward
--
The reading group's reading group:
http://www.bookgroup.org.uk
Nov 12 '05 #2
You need some HTML links on your webpage to sort the columns. You
didn't indicate what kind of dynamic code you're using: such as .ASP
or .CFM (Cold Fusion), so I'll assume it's ASP. Try this HTML code
example below your delarative (dim) statements that define the source
of your database:

<If #How# is "None">
Order By ID
ELSEIF #HOW# is "Name">
Order by Last_Name
ELSEIF #HOW# is "Organization">
Order by Organization
</if>

<A href="yourwebpage.asp?"how=Name"> NAME </a> <!--remark name
link-->
<A href="yourwebpage.asp?"how=ID"> NAME </a> <!--ID name link-->
<A href="yourwebpage.asp?"how=Organization">Organizat ion</a>
<!--remark organization link-->

After adding this code, you can also make a hyperlink at the bottom of
you webpage that will automatically sort by last name whenever it is
clicked.

<A href="http://www.yourwebpage.asp>how=name'</a>
Good Luck!!!
pjac
Nov 12 '05 #3
Pjac,

Can you answer these questions for me ---

How do you set up a webpage where the user must enter a password to access?

How do you then capture the user's name?

How do you set up about six fields for the user to fill in?

How do you get the data in the six fields back to Access?

Can the above be done with a data access page? How?

Thanks for any help you can give me!

Steve
"pjac" <pj**@erols.com> wrote in message
news:94**************************@posting.google.c om...
You need some HTML links on your webpage to sort the columns. You
didn't indicate what kind of dynamic code you're using: such as .ASP
or .CFM (Cold Fusion), so I'll assume it's ASP. Try this HTML code
example below your delarative (dim) statements that define the source
of your database:

<If #How# is "None">
Order By ID
ELSEIF #HOW# is "Name">
Order by Last_Name
ELSEIF #HOW# is "Organization">
Order by Organization
</if>

<A href="yourwebpage.asp?"how=Name"> NAME </a> <!--remark name
link-->
<A href="yourwebpage.asp?"how=ID"> NAME </a> <!--ID name link-->
<A href="yourwebpage.asp?"how=Organization">Organizat ion</a>
<!--remark organization link-->

After adding this code, you can also make a hyperlink at the bottom of
you webpage that will automatically sort by last name whenever it is
clicked.

<A href="http://www.yourwebpage.asp>how=name'</a>
Good Luck!!!
pjac

Nov 12 '05 #4
I suggest that you acquire a Front Page Bible and a HTML book from the
library. It explains everything very well and is easy to use. To
create a dynamic HTML webpage that retrieves data from the database as
opposed to a static data access page, you need the following items:

OBDC connection--DSN (go to Start button on your Windows taskbar, to
the Control Panel, ODBC icon. Set up your DSN (datasource) where the
database is located.)

MS-Access Database (2 tables: Accounts,AccessLog....)

2 webpages (login.asp) and (mainpage.html)

Web Browser (Internet Explorer)

Web Editor (front Page, Word, cold fusion, etc..)

Create a login form in MS-Access that has all the necesary fields
(firstName, lastname, address, etc...), In the menu go to FILE, Save
as Dynamic HTML (follow the prompts). Open the saved webpage in a Web
Editor so that you can see the HTML code. See example below for code.
The textboxes on your login form must have the same names, such as
myUserid, mypassword,lastname....These pass the values typed into the
webpage back to through the ODBC connection to the database.The user
gets an error message if nothing matches the database. It goes to the
next page (mainpage.html) that you have created to say thank you it
the match is correct.
How do you set up a webpage where the user must enter a password to access?

You need to create a dynamic login webpage. See the following HTML
code sample. You can cut & paste the important parts such into your
..ASP webpage.
<QUERY NAME="Get_ID" DATASOURCE="Database1">
SELECT Password,LastName
FROM accounts
where Username ='#form.myUserid#'
</QUERY>

<IF Get_ID.Password is '#form.mypassword#'>
<P>
<OUTPUT>Authenticated</OUTPUT>
<P>
<SET Account_ID=#form.myUserid#>
<SET Account_PW=#form.mypassword#>
<SET Account_LN=#Get_ID.LastName#>

<!--- <QUERY NAME="LogAccess" DATASOURCE="Database1">
INSERT INTO AccessLog (LastName,AccessDateTime)
Values ('#Get_ID.LastName#',#Now()#)
</FQUERY> --->

#form.myuserID# -- #form.mypassword# -- #get_id.recordcount#<BR>
<LOCATION URL="mainpage.html"">
<ELSE>
<output>
<HTML>
<HEAD>
<TITLE>Access Error</TITLE>

</HEAD>

<BODY BGCOLOR="white" >

<P><CENTER><IMG SRC="../../gifs/database.gif"
ALIGN=bottom></CENTER></P>

<TABLE CELLPADDING="0" WIDTH="450" CELLSPACING="0" BORDER="0">
<TR ALIGN="left">
<TD VALIGN="MIDDLE" ALIGN="LEFT" WIDTH=450><b>Access Error</B></FONT>
<P>

The User ID or Password that you entered is incorrect. Please try to
<A HREF="index.html">log in</A> again
<P>
<BR>
</p>
</TD>
</TR>

<TR>
<TD align="center">
<P><CENTER>
<HR WIDTH="70%">
<HR WIDTH="70%">
</CENTER>
</TD></TR>
</TABLE>
</BODY>
</HTML>
</output>
</IF>

Good Luck!!!
pjac

Nov 12 '05 #5
rob
Hi all again.
Thanks for the pointers , but I am still a little confused. i.e
Situation normal :0)
The article that I worked from
http://databases.about.com/library/weekly/aa011401a.htm
makes no mention of editing web pages or any html code. Am I missing
something.
In the article you make an .asp page from 'Products' in the Northwind
database , and use Simple layout.htm as the "template". I did this ,
but when I open Simple layout.htm I get a whole lot of stuff that has
NOTHING to do with
the Northwind dbase. I can't seem to open Products.asp either.
When you open Simple layout.htm with internet explorer should you not
see the
Products table from the database?
I am pretty sure the ODBC stuff is correct.
As I said I am new to this , so I pretty sure I am missing something
obvious to you guys.
Cheers
Rob
pj**@erols.com (pjac) wrote in message news:<94**************************@posting.google. com>...
I suggest that you acquire a Front Page Bible and a HTML book from the
library. It explains everything very well and is easy to use. To
create a dynamic HTML webpage that retrieves data from the database as
opposed to a static data access page, you need the following items:

OBDC connection--DSN (go to Start button on your Windows taskbar, to
the Control Panel, ODBC icon. Set up your DSN (datasource) where the
database is located.)

MS-Access Database (2 tables: Accounts,AccessLog....)

2 webpages (login.asp) and (mainpage.html)

Web Browser (Internet Explorer)

Web Editor (front Page, Word, cold fusion, etc..)

Create a login form in MS-Access that has all the necesary fields
(firstName, lastname, address, etc...), In the menu go to FILE, Save
as Dynamic HTML (follow the prompts). Open the saved webpage in a Web
Editor so that you can see the HTML code. See example below for code.
The textboxes on your login form must have the same names, such as
myUserid, mypassword,lastname....These pass the values typed into the
webpage back to through the ODBC connection to the database.The user
gets an error message if nothing matches the database. It goes to the
next page (mainpage.html) that you have created to say thank you it
the match is correct.
How do you set up a webpage where the user must enter a password to access?

You need to create a dynamic login webpage. See the following HTML
code sample. You can cut & paste the important parts such into your
.ASP webpage.
<QUERY NAME="Get_ID" DATASOURCE="Database1">
SELECT Password,LastName
FROM accounts
where Username ='#form.myUserid#'
</QUERY>

<IF Get_ID.Password is '#form.mypassword#'>
<P>
<OUTPUT>Authenticated</OUTPUT>
<P>
<SET Account_ID=#form.myUserid#>
<SET Account_PW=#form.mypassword#>
<SET Account_LN=#Get_ID.LastName#>

<!--- <QUERY NAME="LogAccess" DATASOURCE="Database1">
INSERT INTO AccessLog (LastName,AccessDateTime)
Values ('#Get_ID.LastName#',#Now()#)
</FQUERY> --->

#form.myuserID# -- #form.mypassword# -- #get_id.recordcount#<BR>
<LOCATION URL="mainpage.html"">
<ELSE>
<output>
<HTML>
<HEAD>
<TITLE>Access Error</TITLE>

</HEAD>

<BODY BGCOLOR="white" >

<P><CENTER><IMG SRC="../../gifs/database.gif"
ALIGN=bottom></CENTER></P>

<TABLE CELLPADDING="0" WIDTH="450" CELLSPACING="0" BORDER="0">
<TR ALIGN="left">
<TD VALIGN="MIDDLE" ALIGN="LEFT" WIDTH=450><b>Access Error</B></FONT>
<P>

The User ID or Password that you entered is incorrect. Please try to
<A HREF="index.html">log in</A> again
<P>
<BR>
</p>
</TD>
</TR>

<TR>
<TD align="center">
<P><CENTER>
<HR WIDTH="70%">
<HR WIDTH="70%">
</CENTER>
</TD></TR>
</TABLE>
</BODY>
</HTML>
</output>
</IF>

Good Luck!!!
pjac

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
5
by: Zalek Bloom | last post by:
Hello, I am developing a simple ASP application with VBScript and Access database. I am testing it on my Win98SE machine using Personal Web Server. My machine is Celeron 2000 with 512Mb RAM. On...
6
by: xmp333 | last post by:
Hi, I have read the MS documentation and researched this matter, but I could not find the answer to my question. If this is online or in a FAQ somewhere, I apologize in advance. How...
8
by: John Baker | last post by:
Hi: I am URGENTLY in need of some book or web site OR tool that will help me integrate a relatively simple access application into a web page or pages. This is a time recording system (by...
10
by: Bugs | last post by:
Hi I have distributed an mdb file that works fine on my PC using Access 2003, but when a copy I sent to someone running Access2003 he gets the error message "missing the intranet or the...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
1
by: pStan | last post by:
Nubie Question...I'm sure this is simple, but here goes anyway. I have a small VB.Net application that uses a local Access Database. I want that same local data replicated to an Internet web site...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
1
by: kkrizl | last post by:
I've tried to research this problem, and I haven't been able to find any references to it. Probably because I shouldn't be doing it, but it was working, and now it's not. I'm trying to develop a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.