![]() |
|
|
Published: Monday, February 21, 2000 By Richard Chisholm Here's a not so hypothetical situation. My web site is on a hosting company's server. I have a couple of databases up on it, but if I want to edit them normally I'd have to use FrontPage to access and download the whole thing. With a large database we're talking about a serious wait over a modem. Or how about this one: you need to have a person edit an online database, but they don't have access to the server. That's where this application comes in handy. After reading "Generic ASP Database Editor for Access Tables" by Roman Koch and using his app, I felt that by building a couple of layers on top of Roman's page, I could accomplish what I wanted. Namely an easy way to add/edit/delete records on any database in a web site without accessing it directly.
While fully acknowledging Roman's effort, I feel what I have done adds a lot of functionality. Basically I have merged Roman's editor app with a process I read about on ASPToday.com in an article called "Dynamic ASP/JavaScript for Data Refresh." In that article, a frames page is used where one frame set to 100% is used for displaying the content, while the other (set at 0% of course) is an ASP page and does all the processing of the logic. The app that I wrote uses the display page to show the user available databases and tables, while the logic page(s) are responsible for determining what databases/tables are available. Using the frame display/logic process works well because it integrates well into existing templates, and it eliminates the overhead by only loading the display page HTML once. Now, before I get started let me say a few things:
2.) This app is probably a resource hog. It uses Session variables and connects many times to the database, opening both recordsets and schemas. While this is certainly a useful tool for a few people, I really wouldn't recommend it for any significant number of users. (See Are Session Variables Really Evil? for more information!) 3.) Finally, because this uses the This app is composed of the following files:
First off the frames page. I don't need to put the source here, just make it two rows named
JavaScript:
HTML:
Note the two spans. The one named
Once the form is submitted, the
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|