473,406 Members | 2,710 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,406 software developers and data experts.

Access files into a webpage

Hi,
I have a searchable databse in Access that I would like to convert
into a simple website. Can anyone point me in the right direction?
Nov 12 '05 #1
2 1217
I didn't really debug this code, but if you change the names
to match your ASP page (change Sample.asp to your page)
and the database (change MyDb.mdb to your database), then
this should work. If not, it will definitely get you started.

Good luck
<%@ Language=VBScript %>
<% Option Explicit %>

<HTML>

<%
Dim objCnn, sPath sConn, objRst, sSQL

sPath = LCase(Server.MapPath("Sample.asp"))
sPath = Replace(sPath,"Sample.asp","MyDB.mdb")
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
"Persist Security Info=False;Data Source=" _
& sPath

' Create an ADO database connection
Set objCnn = server.createobject("adodb.connection")
objCnn.open(sConn)

' Create ADO Recordset and load sql statement
Set objRst = server.CreateObject("adodb.recordset")
sSQL = "SELECT * FROM tblExample ORDER BY MyField"
Set objRst = objCnn.Execute(sSQL)

If objRst.BOF And objRst.EOF Then
%>
<table><tr><td>No Records To Display</td></tr></table>
<%
Else
%>
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<%
Do Until objRst.EOF
%>
<tr>
<td><%=objRst.Fields(0)%></td>
<td><%=objRst.Fields(0)%></td>
</tr>
<%
objRst.MoveNext
Loop
%>
</table>
<%
Set objRst = Nothing
Set objCnn = Nothing

End If
%>

</HTML>

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com
<ph*******@miltonsoffice.com> wrote in message
news:d1**************************@posting.google.c om...
Hi,
I have a searchable databse in Access that I would like to convert
into a simple website. Can anyone point me in the right direction?

Nov 12 '05 #2
There is a very good product called ASPMaker that does a great
job at generating the asp code for you. It can be found at:

http://www.hkvstore.com/
On 5 Dec 2003 08:17:35 -0800, ph*******@miltonsoffice.com
(ph*******@miltonsoffice.com) wrotE:
Hi,
I have a searchable databse in Access that I would like to convert
into a simple website. Can anyone point me in the right direction?


Nov 12 '05 #3

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

Similar topics

2
by: spike | last post by:
I tried to upload a .htaccess-file to the directory that i wanted to protect. This is what I wrote in it: ------------------------------------------------ <Limit GET> order deny,allow deny from...
5
by: rob | last post by:
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...
5
by: Bas Hendriks | last post by:
Has anyone any idea how asp.net find it's files back after compiling them to the temporary asp.net directory? I found on numerous webpages that the directorynames are chosen random but cannot find...
5
by: Seok Bee | last post by:
Dear Experts, I currently trying to use the FileUpload control from asp.net 2.0 to upload files. The uploading of the file I would like to store it in the Access Database. Unfortunately, I've no...
6
by: Boris | last post by:
Has anyone ever managed to read a Windows registry key in a PHP webpage? I installed the PHP extension win32std and saved their sample script from...
14
by: Kevin G. Anderson | last post by:
What: CAUG Meeting - QuickBooks IIF Files; Total Access Analyzer; CAUG Social When: Thursday, May 25, 2006, 6PM Who: Chris Monaghan and Kevin Anderson Where: The Information Management Group...
6
by: Dave Keen | last post by:
Hi all I am writing a webpage which asks the user for the name of a picture file, then reads the file, resizes if necessary and saves it to the server. The code to read the file is... ' Set...
4
by: Richard Finnigan | last post by:
Hi I'm having real difficulties getting a very simple access database file to show its data in visual studio data controls with various error messages occuring. I've changed the permissions on...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I access the client-side filesystem?...
0
by: gpl666666 | last post by:
I use Microsoft Access to create a webpage I publish this webpage to our company server, it gives two messages when I open the webpage, one is: "This website uses a data provider that may be...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.