473,756 Members | 4,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Database on Web Servers

I am an experienced Access user but recently moved an Access database
to the web for my employer.

We use a host that does not allow the use of data access pages.

Is there anyway to pre-build a query and/or report in Access that could
generate an Excel download? I was thinking of using a macro, but I
have no idea how to invoke the macro.

Thanks in advance!

Kevin

Nov 13 '05 #1
4 2035
ctkevin wrote:
I am an experienced Access user but recently moved an Access database
to the web for my employer.

We use a host that does not allow the use of data access pages.
Not surprising, DAPs are really just a mini Access running inside a web
page and gets the data from the MDB direct from the client side, this
would require that the client's PC could see a share on the web server
and see the MDB. It's a shitty marketing ploy to make Access users think
they can web enable their application and whoever invented it should be
hanged, drawn and quartered, stitched together, brought back to life and
killed all over again.
Is there anyway to pre-build a query and/or report in Access that could
generate an Excel download? I was thinking of using a macro, but I
have no idea how to invoke the macro.


That would require that Access actually ran on the server, I seriously
doubt your ISP would allow that either, they want their server to stay
up for more than half a day and/or can't afford to hire a full time
person to kill the hung processes as Access displayed it's error
messages to no-one.

You need to look into using ASP 3.0, ASP.NET, CGI, Cold Fusion or
similar technology to web enable the application.

--
This sig left intentionally blank
Nov 13 '05 #2
Hey Trevor - thanks for the commentary.... :)

Guess I should've mentioned that I used Dreamweaver to build an
application around this database using ASP and VB. I'm just not aware
of any method for allowing a user to take a pre-built query or report
and downloading it as an Excel file. If this can be done using ASP,
can you direct me to an appropriate resource for reading? I have
several books on ASP I just don't know where to begin looking.

Nov 13 '05 #3
ctkevin wrote:
Hey Trevor - thanks for the commentary.... :)

Guess I should've mentioned that I used Dreamweaver to build an
application around this database using ASP and VB. I'm just not aware
of any method for allowing a user to take a pre-built query or report
and downloading it as an Excel file. If this can be done using ASP,
can you direct me to an appropriate resource for reading? I have
several books on ASP I just don't know where to begin looking.


Using normal BASIC I/O you can produce a csv file, readable in Excel but
since ASP's version of VBScript is a little light BASIC i/o is not
implemented and you need to use the Scripting FileSystemObjec t, which
may prove troublesome is the host is running an older version of some AV
programs with script blocking.

Otherwise it would need to have the Excel object libraries on there for
you to create an Excel object to create the excel file. You'll need to
know the local and virtual paths (local to create, virtual for user to
download it), they're available in the server environment
(Request.Server Variables, PATH_INFO and PATH_TRANSLATED IIRC)
--
This sig left intentionally blank
Nov 13 '05 #4
kevin,

You should never attempt to open MS Excel or any other office
application directly from your web application on your server. This
will completely bog down your application. Instead, Microsoft has
create Office Web Components (OWC) specifically for generating Excel
worksheets and charts on the server which can then be viewed in the
browser as Excel. You can download a reference for using OWC from the
microsoft site at
http://msdn.microsoft.com/office/und...c/default.aspx. As
long as you install MS Office on the server, you will have use of OWC.

I don't use ASP any more, but here's a snippet of code I once used to
generate an Excel worksheet with OWC:

<%
Sub CreateSpreadshe et(objRS)
'Create the spreadsheet
Set ss1=CreateObjec t("OWC.Spreadsh eet")
Set c = ss1.Constants
Set ws=ss1.ActiveSh eet
'ws.range("A1") .VAlignment=2

' Set the row height and column width
'ws.Columns.Col umnWidth=322
'ws.Rows.RowHei ght=25

'Place the values into the cells
i=0
Do until objRS.EOF
i=i+1
With ws
'.cells(i,1).fo nt.size=8
.cells(i,1).val ue=i
.cells(i,2).val ue=myvalue4(obj RS.fields("Cust omerID"))
.cells(i,3).val ue=myvalue4(obj RS.fields("Last Name"))
.cells(i,4).val ue=myvalue4(obj RS.fields("Firs tName"))
.cells(i,5).val ue=myvalue4(obj RS.fields("Clas sLevel"))
.cells(i,6).val ue=myvalue3(obj RS.fields("AvgO fTableResult"))
.cells(i,7).val ue=myvalue3(obj RS.fields("AvgO fTheoValue"))
.cells(i,8).val ue=myvalue3(obj RS.fields("Coun tOfCustomerID") )
End With
objRS.MoveNext
Loop

'Export the spreadsheet
mypath=server.M apPath("theoval ueexport.xls")
ws.export mypath, c.ssExportActio nNone
Set c=Nothing
Set ws=Nothing
Set ss1=Nothing
End Sub
%>

OWC is OK but the fastest way to create the report is to generate a
text file and save it as a CSV file, which has already been mentioned.
Once saved you can have the user open it with a link. Even better, I
think that you can stream the output directly to the browser and have
it opened as Excel by setting Response.Conten tType =
"applicatio n/vnd.ms-excel"

Here's some code to make the same report using this method:
Sub CreateTextFile( objRS)
nr=0
Set fso=Server.Crea teObject("Scrip ting.FileSystem Object")
mypath=server.M apPath("theoval ueexport.txt")
Set mytextfile=fso. CreateTextFile( mypath,True)

mytextfile.writ eline
"#,CustomerID,L astName,FirstNa me,ClassLevel,A ctualValue365,T heoValue365,Voy ages365"

Do until objRS.EOF
nr=nr+1
mytext=nr & "," & myvalue4(objRS. fields("Custome rID")) & "," &
myvalue4(objRS. fields("LastNam e")) & ","
mytext = mytext & myvalue4(objRS. fields("FirstNa me")) & "," &
myvalue4(objRS. fields("ClassLe vel")) & ","
mytext = mytext & myvalue3(objRS. fields("AvgOfTa bleResult")) & "," &
myvalue3(objRS. fields("AvgOfTh eoValue")) & ","
mytext = mytext & myvalue3(objRS. fields("CountOf CustomerID"))
mytextfile.writ eline mytext
objRS.MoveNext
Loop

mytextfile.clos e
Set mytextfile=Noth ing
Set fso=Nothing
End Sub
%>

I hope this helps you.

Bill E
Hollywood, FL

ctkevin wrote:
Hey Trevor - thanks for the commentary.... :)

Guess I should've mentioned that I used Dreamweaver to build an
application around this database using ASP and VB. I'm just not aware of any method for allowing a user to take a pre-built query or report
and downloading it as an Excel file. If this can be done using ASP,
can you direct me to an appropriate resource for reading? I have
several books on ASP I just don't know where to begin looking.


Nov 13 '05 #5

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

Similar topics

3
3353
by: cooldv | last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and Access 2000 database. (with a hosting company) traffic is slow at this time but expect to grow. lately i have been reading about sql database and sql server, specially this article: http://www.aspfaq.com/show.asp?id=2195 will someone help me understand: 1. with *SQL Server*, do i keep my current Access 2000 database and ASP pages?
0
1870
by: Todd Calhoun | last post by:
Hi, I've got a MySQL database being hosted by a company. The site has phpMyAdmin for external administration, but I'd like to use a program like EMS MySQL manager, or maybe even an OBDC connection for certain things. But I can't get the SSH tunnel to work. I can access the account using an SSH logon through putty, and once in, I can access MySQL using the terminal. But I can't get port forwarding to work.
3
4149
by: dstewart | last post by:
Situation: One common MySQL database server on SuSE 9.1 with all updates. Uses 'rinetd'. Has entries for the appropriate IP addresses of all servers. NOTE: If the appropirate entries are NOT in rinetd, the error message is: ERROR 2013: Lost connection to MySQL server during query Using the exact same query from prompt on several clients (some are SuSE 9.1, some are older Redhat systems, but none are configured
25
4386
by: cory | last post by:
Hi, I have an Access database and am having an ASP.NEt application written for it. It is almost complete. I have a hosting company that I signed up with a month ago but before I did anything I asked them if Access and ASP.NET would work on their servers, they said yes so I bought in. Now they are saying my application wont work on their servers using MSaccess and I can only use SQL or asp 3.0. They are saying Microsoft is trying to...
6
1998
by: Serious_Practitioner | last post by:
Good day all, and thank you in advance for your help. No - MANY thanks in advance for your help - I know nothing about using databases on Web servers. I am about to discuss a project with a client who is in the apartment rental business. He solicits "For Rent" listings from property owners and managers, advertises the apartments, shows them, takes applications and like that. His inventory, as it were, is a list of vacant apartments that...
4
2075
by: Singularity | last post by:
Hi The technical support guys at my company have set up my system so that the server containing the MS Access database is on one server, while the pages that should access the database are on another server. When the pages and database are on the same server, I usually just connect through ODBC. The problem is that I don't know how to set up an ODBC connection to
17
2496
by: DaveG | last post by:
Hi all I am planning on writing a stock and accounts program for the family business, I understand this is likely to take close to 2 years to accomplish. The stock is likely to run into over a thousand items and the accounting side will be used for hopefully many years so the entries are likely to be vast. The delema is what is best to use ase the DB engine, Access I have as part of Office 2002 or should I really be looking at SQL...
15
4639
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
7
12311
ADezii
by: ADezii | last post by:
There are essentially three techniques for publishing Access Data on the Web. The first technique is static, and does not allow for the dynamic addition or modification to the data, There is no direct link to the data, and in order to update it, you must republish. I am referring to the HTML Format. The second format, IDC, is an older, obsolete technology that runs on Microsoft web Servers. IDC has limited functionality, no script language...
13
3734
by: magickarle | last post by:
Hi, I got a pass-through query (that takes about 15 mins to process) I would like to integrate variables to it. IE: something simple: Select EmplID from empl_Lst where empl_lst.timestamp between !! And !! Not sure how to do so (should it be a query in Access or a macro) The connection would be ODBC.
0
9487
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10069
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9735
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7285
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6556
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.