473,382 Members | 1,329 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,382 software developers and data experts.

How to display table from Microsoft Access to ASP file

145 100+
Hi,
I'm trying to make a dynamic website using asp and javascript and access as my database. I'm wondering if the asp file able to display table from access where user can view and change the information in the table...
Sep 9 '09 #1
1 2405
GazMathias
228 Expert 128KB
@puT3
What you are talking about is generally called Scaffolding. It is not a built in feature of classic ASP, but is available in some frameworks for other languages like Rails, PHP and ASP.Net.

That said, building one is something that I guess everyone does sooner or later in one way or form.

To get you started, simply draw out your table and include an edit link in each row, then send that row to somewhere you can edit it.

You must also take into consideration the design of the database with particular regard to data types, joins and referential integrity.

Just wrote a sub that draws out a recordset to get started, it takes two arguments:

thers = the name of a recordset you have opened.

params is properties for the table tag, ie "style = 'myTableStyle' "

Expand|Select|Wrap|Line Numbers
  1. Sub DrawTable(ByRef thers, ByVal params)
  2.  
  3. If Not left(params,1) = " " then params = " " & params
  4.  
  5. thers.movefirst
  6. Response.Write "<table" & params & ">"
  7. Response.Write "<tr>"
  8. For Each header in thers.Fields
  9. Response.Write "<th>" & header.Name & "</th>" & vbNewLine
  10. Next
  11. Response.Write "</tr>" & vbNewLine
  12. Do While Not thers.eof
  13.     Response.Write "<tr>"
  14.         For Each Field in thers.Fields
  15.             Response.Write "<td>" & Field & "</td>"
  16.         Next
  17.     Response.Write vbNewLine & "</tr>" & vbNewLine
  18.     thers.movenext
  19. Loop
  20. Response.Write "</table>"
  21. End Sub
  22.  
  23.  
I haven't yet looked into figuring out what the PK of the table is to provide the edit link, might do later if I get time.

Gaz.
Sep 9 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Rich | last post by:
I'm sure it sounds kinda nutty to display 200 columns and 500,000 rows of data. But I have been pulling data from a Lotus Notes database into Sql Server for a while now, but Lotus Notes is...
4
by: dmiller23462 | last post by:
I'm trying to create a submission page for users to request PC/LAN Access....If they select "Yes" in the field asking about if they need Non Standard Software, I want several other HTML fields to...
5
by: Victor | last post by:
Hi I need to open an html file from the file system and embed that html file within my main aspx form. I have 2 questions: 1) How do I open the html file? I tried the File.open(Path, mode) didnt...
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
9
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar....
46
by: OldBirdman | last post by:
What a mess this question is. I have spent 2 weeks trying to make it concise and clear, and I can't. I do not have the vocabulary for the question. I cannot even TITLE it correctly. Here is my...
1
by: sunnyluthra1 | last post by:
Hi Everyone, I am working on a piece of code, that displays the properties(Name, Datatype, size & Description) of the table in the database. Now I want to further Enhance the code. I Have created...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net app, in the page there is a scan activex which could scan and save a jpg file in client harddisk. How could we access and display this jpg file on the fly using js in the client...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.