Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Enable Access DB

Status
Not open for further replies.

blackduck

Programmer
Jun 11, 2002
119
0
0
AU
I have a client wanting to web enable part of their access database. They need customers to be able to login, only view their own details, and book in jobs.

They mentioned Data Access Pages. I haven't used these before and am looking for resources on such, especially how good or suitable they are for the situation. I have done some work in coldfusion before and am wondering how DAPs compare and how they handle sessions.

Any advice would be greatly appreciated.
Thank you
 
[tt]

I'm sure you can use .cfm files to do this, I use ASP and if you want to get more acquainted with it, read my previous post at thread333-377604

And if you need assistance setting the .asp pages up, let me know...
[tt]
[sup]"The only ideas that will work for you are the ones you put to work."[/sup]
[/tt]

 
One very important restriction in using Data Access Pages to produce intereactive Web Pages: In order to interact with the data (add/edit/delete), the user must be using Internet Explorer 5 (or above) AND have a Microsoft Office 2000 (or XP?) License (not Office 97, 95, etc.) - although they do not have to have Access installed. As you may have already guessed, Data Access Pages are not coded in ASP; they have their own special objects, which is why Internet Explrer 5+ is required.

Here's what Microsoft has to say about Data Access Pages:
General Description:
Tasks Data Acess Pages can perform:

Unless your client can guarantee their users will all have IE 5+ and a MS Office 2000 (+) License on their computer(s), you really can't use Data Access Pages without excluding some of the users.

IMO, your best option(s) would be to use Cold Fusion (or ASP, or PHP) - whatever you and your client can agree on. Hope this helps.
Ciao, K----------------
"If you were supposed to understand it, we wouldn't call it code" - FedEx
 
I would recommend ASP's. They're easy to learn. I've just started playing with them myself a couple weeks ago - and have created a number of pages. Creating the query is the easy part. How are you going to control authentication. Will this be on a site that has sign in requirements? If so, you can use the login id as a cross reference to the customer number (or whatever identifies the cust) and build it into your query. Not addressing that issue, here is a sample piece of code on how to connect to an Access 2000 DB:

<html>
<head>
<script type=&quot;text/javascript&quot;>
function addwildcards()
{
y=document.myForm
searchstring=y.myInput.value

y.myInput.value=&quot;'%&quot; + y.myInput.value + &quot;%'&quot;
}

function setFocus()
{
document.forms[0].myInput.focus()
}

function openTips()
{
window.open(&quot;searchtips.html&quot;, &quot;searchTips&quot;,&quot;toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=yes,top=120, left=300, width=400,height=400&quot;)
}
</script>
</head>
<body>
<table border=&quot;1&quot; width=&quot;100%&quot; bgcolor=&quot;#fff5ee&quot;>
<tr>
<td colspan=&quot;3&quot;>
<form name=&quot;myForm&quot; onsubmit=&quot;addwildcards()&quot; action=&quot;vbsearch.asp&quot; method=&quot;POST&quot;>
Search database for
<input type=&quot;text&quot; name=&quot;myInput&quot;>
<input type=&quot;submit&quot; value=&quot;Search&quot;>
<input type=&quot;button&quot; value=&quot;Search Tips&quot; onclick=&quot;openTips()&quot;>
</form>
</td>
</tr>
<tr>
<td bgcolor='#b0c4de'>
<a href=&quot;vb.asp?sort=application&quot;>Application</a>
</td>
<td bgcolor='#b0c4de'>
<a href=&quot;vb.asp?sort=topic&quot;>Topic</a>
</td>
<td bgcolor='#b0c4de'>
<a href=&quot;vb.asp?sort=nbr&quot;>Number</a>
</td>

</tr>

<%
dim conn,rs,sort
sort=&quot;nbr&quot;

if Request.QueryString(&quot;sort&quot;)<>&quot;&quot; then
sort=Request.QueryString(&quot;sort&quot;)
end if

set conn=Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.Provider=&quot;Microsoft.Jet.OLEDB.4.0&quot;
conn.Open(Server.Mappath(&quot;tmrkb.mdb&quot;))
set rs=Server.CreateObject(&quot;ADODB.recordset&quot;)
rs.Open &quot;SELECT Application,Topic,nbr FROM vb ORDER BY &quot; & sort,conn

do until rs.EOF%>

<tr>
<form method=&quot;post&quot; action=&quot;vbdet.asp&quot;>
<%for each x in rs.Fields
if x.name=&quot;nbr&quot; then%>
<td><input type=&quot;submit&quot; name=&quot;nbr&quot; value=&quot;<%=x.value%>&quot;></td>
<%else%>
<td><%Response.Write(x.value)%> </td>
<%end if
next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table>

<!-- Set focus to myInput -->
<script language=&quot;javascript&quot;>setFocus()</script>
</body>

</html>

I have not included the code for the called pages. All you need to look at is the section with the connection section and the Record Set. The rest you can cut out.

I've also used this method to connect to our ERP via ODBC (a Progress DB). Cool stuff.

Tim Tim Ryan
PROGRESS Developer
 
Thanks for the help. The client still wants more research done on Data Access Pages, so I'll read up on those links Kim1234.

The client is running MS small business server, and wants to host the site themselves, so dont want to pay for coldfusion.

Anyway, I'm going to follow your asp links and code, because its something I want to become skilled in either way.

And tmryan, the site will need login authentication, and therefore only to show those records in the db belonging to the login user. I may need some help on this also later.

Thanks again heaps. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top