By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 2,015 Online
Bytes IT Community
Submit an Article
Got Smarts?
Share your bits of IT knowledge by writing an article on Bytes.

Publishing Access Data on the Web

ADezii
Expert 5K+
P: 8,610
[OVERVIEW]
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 support, and is essentially a dinosaur. The third, and only viable option for publishing Access data on the Web is the ASP format. ASP is an excellent choice for publishing your data to the web since it is dynamic in nature and involves two familiar technologies. I'll touch lightly on the first two methods, HTML and IDC, then go slightly more in depth on the third. A thorough discussion of ASP is well beyond the scope of this Tip, and would require a book of its own. For the purposes of this discussion, the following Access Objects can be published on the Web: Tables, Queries, Reports, and Datasheets behind Forms.

[FORMATS]
  1. When you publish an object on the Web in HTML format, Access takes a snapshot of the data and creates a HTML page (*.html) containing a Table which looks similar to the Access datasheet. This format is supported by all Web Browsers and Servers on dozens of different platforms.
  2. When an object is published via the IDC format (Internet Database Connector), Access generate a SQL statement to represent the data. In order to connect the Web Page back to the database at run-time you must supply an ODBC Data Source Name. The SQL statement and DSN are saved to an IDC file. An HTML Extension File (*.htx) is also generated and contains a Template of the formatted output. At run-time, the Web Server runs the Query and generates a HTML document from the *.idc and *.htx files, that it sends back to the browser. The IDC format is an older, obsolete technology that runs on Microsoft Web Servers. All the processing is done on the Web Server, and consequently the pages work with any Browser.
  3. ASP (Active Server Pages), are similar to the IDC format in several aspects. Access generates a SQL statement to represent the data, and an ODBC Data Source Name (DSN) must be supplied. This allows the allows the generated Web Page to be dynamically linked back to the database so that it reflects the state of the Database at the time the Page is viewed. Access saves both the SQL statement and formatting information to an ASP file using VBScript scripting code. The data access portion of the ASP code uses the familiar ADO to access the data. At run-time, the Web Server runs the ASP code and generates a HTML document that it sends back to the Browser. The ASP format is supported by Microsoft and compatible Web Servers. Because the ASP code is executed on the Web Server, the generated pages work with any Browser.
[PUBLISHING AN ACTIVE SERVER PAGE]
  1. Create an ODBC Data Source (DSN)
    1. Access the Control Panel on the Web Server.
    2. Click the System DSN Tab of the ODBC Data Source Administration Dialog Box.
    3. Add.
    4. Select the appropriate Driver and supply any additional information.
  2. Select the object in the database window that you wish to publish.
    1. File.
    2. Export.
    3. Save as Type (Microsoft Active Server Pages (*.asp).
    4. Complete the information on the Microsoft Active server Pages Output Options Dialog Box.
  3. Configure the Web Server for ASP.
  4. Copy the files to the Web Server folder.
  5. View the ASP Page using your Web Browser. You can use the following syntax to navigate to the Page: http://server_name/folder_name/page.asp
[SPECIAL NOTATIONS]
  1. You can use the OuputTo Method of the DoCmd Object to programmatically generate Web Pages in HTML, IDC, or ASP format.
  2. If you wish to create data-driven Pages that go beyond the Export Dialog Box's capabilities, you should have little trouble programming Active Server Pages since they are based on the same technologies that many of you are already familiar with: HTML, VBScript, and ADO.
  3. Sample Editors to use for programming ASP Pages:
    1. Notepad (simplest).
    2. Microsoft Script Editor (intermediate).
    3. Visual InterDev (advanced).
Mar 17 '08 #1
Share this Article
Share on Google+
7 Comments


mshmyob
Expert 100+
P: 903
Great article Adezii. Just as an update, the new AC2007 no longer supports Active Server pages. With AC2007 MS wants you to install, implement and support a Sharepoint server.

cheers,
Aug 18 '08 #2

ADezii
Expert 5K+
P: 8,610
Great article Adezii. Just as an update, the new AC2007 no longer supports Active Server pages. With AC2007 MS wants you to install, implement and support a Sharepoint server.

cheers,
Good point mshmyob, If I am correct, all support for DAP (Data Access Pages) creation is missing also, although it will still support existing ones. Am I correct on this? I don't have Access 2007 as of yet, way behind the times (LOL).
Aug 18 '08 #3

mshmyob
Expert 100+
P: 903
Oops I did mean to say no support for DAP not ASP lol. Everything else holds true. They are trying to get us to buy into Sharepoint.

cheers,

Good point mshmyob, If I am correct, all support for DAP (Data Access Pages) creation is missing also, although it will still support existing ones. Am I correct on this? I don't have Access 2007 as of yet, way behind the times (LOL).
Aug 18 '08 #4

P: 1
I realize this article and comments are old, but just in case someone finds this article like I did, I would like to remind everyone that ColdFusion can deliver Access data to the internet.
Dec 20 '10 #5

ADezii
Expert 5K+
P: 8,610
Thanks Erica, for letting us know.
Dec 20 '10 #6

100+
P: 547
For those interested in publishing a html file via Access. I use the following code to first create the HTML page in a specific folder and then it gets uploaded from there.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputQuery, "QueryName", "HTML(*.html)", "c:\folder\filename.html", False, "", 0, acExportQualityScreen
A table stores the website upload data.
The following code ftp it for me.
Expand|Select|Wrap|Line Numbers
  1.     ' One file is created, which is the a list of commands that are sent to FTP.EXE
  2.     ' The name of this text file is passed along to FTP.EXE through the SHELL command.
  3.     ' Note that your user name and password are saved both in the text file and
  4.     ' in the database itself.
  5.     Dim BatchFileNo%, ScriptFileNo%, UploadFile$, FileNo%
  6.     FileNo = FreeFile
  7.     ChDir Application.CurrentProject.Path
  8.     Open "ftp-cmd.txt" For Output As #FileNo
  9.     Print #FileNo, "open " & Me.Website
  10.     Print #FileNo, Me.Username
  11.     Print #FileNo, Me.Password
  12.     If Len(Nz(Me.DestinationFolder, "")) > 0 Then
  13.         Print #FileNo, "cd " & Me.DestinationFolder
  14.     End If
  15.     Print #1, "send " & Me.FileName
  16.     Print #1, "bye"
  17.     Close FileNo
  18.           Shell "ftp.exe -s:ftp-cmd.txt", vbNormalFocus
I do sport events timing and prefer manual uploading of html results every few minutes, as the timer function seems to interferes while timing a race. However,this code only takes a few seconds to upload. See the attachment for the form and table i use.
This works for me.
Attached Images
File Type: jpg upload.jpg (41.3 KB, 175 views)
File Type: jpg ftp-table.jpg (73.4 KB, 184 views)
Nov 27 '13 #7

zmbd
Expert Mod 5K+
P: 5,287
Update for ACC2010: ASP are no longer one of the options within the program. MS has instead forced publishing to their Sharepoint based servers.
Nov 27 '13 #8