Important alert: (current site time 7/15/2013 11:47:32 PM EDT)
 

winzip icon

Online Database Editor

Email
Submitted on: 3/18/2002 10:37:59 AM
By: Andy T. 
Level: Intermediate
User Rating: By 32 Users
Compatibility: ASP (Active Server Pages), HTML, VbScript (browser/client side)
Views: 44926
author picture
(About the author)
 
     This will allow you to edit a collection of Access database's table data online. The bulk of the working code was originally submitted by Cakkie, and I added some new features, like secure login, the ability to select any database/table in a predefined directory, query tool, paging, result set count, and a new CSS style schema. I tested it a bit, but please report any bugs that may occour. View the ReadMe.txt file for setup instructions. UPDATED 9/12/2002

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/18/2002 10:39:30 PMLewis Moten

This is pretty cool, but only set for being in a directory off of the root directory. It worked ok after I changed the path to the database and include files.
(If this comment was disrespectful, please report it.)

 
3/19/2002 12:09:20 AMAndy T.

Whoops, missed that one, but I fixed it. Thanks for the feedback.
(If this comment was disrespectful, please report it.)

 
3/19/2002 12:38:29 PMAndy T.

3/19/02
Updated the project to allow password entry for protected databases. Special thanks to Ian for the fix.
(If this comment was disrespectful, please report it.)

 
3/24/2002 4:23:33 PMWolter

Hmm, very very nice.

However, I changed the code a little bit so that it would return to a proper page after I press the logoff button.
I made a new CONST GotoAfterLogoff = "http://www.websitename" in the ADO.asp page that holds the website to return to, and changed the code in the LOGIN.asp to "Response.Redirect(GotoAfterLogoff)".

(If this comment was disrespectful, please report it.)

 
3/26/2002 5:52:43 PMRobert Santorelli

My db file is off the root.
Im going nuts trying to configure this,
Suggestions?
(If this comment was disrespectful, please report it.)

 
3/26/2002 7:58:08 PMAndy T.

Make sure you change the path to your database directory. If your database is directly on the root folder change the path variable in ado.asp to Server.MapPath("/"). I just tested this and it worked fine, contact me if the problem persists.
(If this comment was disrespectful, please report it.)

 
4/25/2002 1:16:54 PMChris

I'm a beginner, but after changing paths I see empty screen after loading login.asp page... anyone will help..?
(If this comment was disrespectful, please report it.)

 
4/29/2002 8:27:03 AMThe Sam

I think it would be a kick to try to port this code for databases besides Access. I'll see what I can do, and get back to you.
(If this comment was disrespectful, please report it.)

 
4/29/2002 10:43:35 PMTravis

I'm trying to set up this whole thing to work and I'm running into problems, I have everything set up I believe. I can get into my database and go into a table, and adding a record works fine, however I can't edit it? I get this when the update is pushed:

3001
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

Any ideas to how to fix this or what I'm doing wrong? Thanks!
(If this comment was disrespectful, please report it.)

 
4/30/2002 8:20:25 AMAndy T.

Without trying to recreate the error, I would say you either have an incorrectly formatted date field or other field that is being loaded with an inproper data type, for example a string in an integer field.
(If this comment was disrespectful, please report it.)

 
5/6/2002 6:49:47 AMFrancesco

SECURITY WARNING!!!!!!!!
The simplest security test .....
Change the sql authentication string. if you enter
username:' or ''='
password:' or ''='

pppuuupuffffff!!!!!!!!

good bye username and password!!!!

Bye
(If this comment was disrespectful, please report it.)

 
5/6/2002 9:18:59 AMAndy T.

I uploaded the fix, the login will not accept any single quotes (') anymore.
(If this comment was disrespectful, please report it.)

 
5/15/2002 4:40:52 PMMarius

I have a database with more dan one table. In the table secetion i see the Columns from all the tables. is it posible to see only the ones from the selected table.
(If this comment was disrespectful, please report it.)

 
5/15/2002 5:04:20 PMAndy T.

Either the field name issue has been there the entire time and nobody cared, or it happened on my last bug fix. Either way, the error is now fixed and the field names will be specific to an individual table.
(If this comment was disrespectful, please report it.)

 
5/18/2002 4:20:04 AMKent

I got it. Thank you. My Access type is same as your setting: MSMicrosoft Access Application. But I still can not find any files in the dropdown selection though I have access files in the root directory and set
Const DB_FOLDER_PATH = "/"
in the ado.asp. Any further suggestions? Thank you in advance.
(If this comment was disrespectful, please report it.)

 
5/20/2002 8:35:13 AMAndy T.

Honestly, I'm having a tough time recreating your issue. It may be a security issue with the IUSR_Machine account's rights to read the file or directory contents. Personally I would try using Response.Write statements in various loops to determine what the program is or is not finding in the root, then go from there.
(If this comment was disrespectful, please report it.)

 
6/4/2002 12:51:19 AMJOE

Hi.. I would like to ask for the Readme file that you wrote
"Just change the "DB_FOLDER_PATH" value in ado.asp to your database directory."

What does this mean? I had put the all your asp folder to

C:\Inetpub\wwwroot\JOE\ASP

The database you created are in
C:\Inetpub\wwwroot\JOE\ASP\database\SiteSearch.mdb

Just wonder what shoudl i do?

It seems that i cnanot run the asp smoothly..

Thanks

(If this comment was disrespectful, please report it.)

 
6/4/2002 8:51:10 AMAndy T.

Well, generally in site development using Access databases, a common directory is used to store all database files. You need to point this constant's path to that directory, or whichever database you want to edit. Also make sure your path to the dbeditor.mdb file is correct.
(If this comment was disrespectful, please report it.)

 
6/24/2002 11:31:19 AMcarla

hi again! i'm beginner on this but working fast.
ok, the ado.asp says:
Const DB_FOLDER_PATH = "/data/"
so, if i want to use dbeditor to edit a certain database in a dir like this:
database to edit
root:/search/db1.mdb
should i change the
Const DB_FOLDER_PATH = "/data/"
to
Const DB_FOLDER_PATH = "/search/"
????????
(If this comment was disrespectful, please report it.)

 
6/24/2002 11:34:06 AMAndy T.

Yes
(If this comment was disrespectful, please report it.)

 
6/24/2002 5:20:11 PMAndy T.

Probably that the path you are trying to open with the FSO object does not exist or is incorrect. Do a Response.Write(strPath) on line 92 to see exactly where the path variable is pointing.
(If this comment was disrespectful, please report it.)

 
7/8/2002 9:30:31 PMJose

All i get is a server 500 error, i even turned everything on read/write/execute and still nada. Code broke or me??
(If this comment was disrespectful, please report it.)

 
7/18/2002 12:34:13 AMGeorge

Great code! I'm having problems with updates. I get a script time out. Any ideas? I just cant seem to update. its not a permissions thing on my iis, I am able to update via my web apps, just not with this script.

(If this comment was disrespectful, please report it.)

 
7/18/2002 8:27:16 AMAndy T.

That error is usually not hard to pin down. The only times I run into it, in general, is when I forget to include the "RS.MoveNext" statement in a loop, but you are the first to report such in this app. My advice is to use Response.Write's at various points to narrow down the process that is taking so long.
(If this comment was disrespectful, please report it.)

 
7/18/2002 8:43:14 PMAlex

Will you be planning on adding support for Phyiscal paths as well? I store my MDB databases in a database folder that has no virtual directory for security purposes.
(If this comment was disrespectful, please report it.)

 
7/19/2002 8:13:51 AMAndy T.

In ado.asp, change the variable "DB_FOLDER_PATH" to your physical path (ie. "C:\Inetpub\Data\") and change all "Server.MapPath(DB_FOLDER_PATH)" to simply "DB_FOLDER_PATH".
(If this comment was disrespectful, please report it.)

 
9/12/2002 3:27:21 PM

Hi,

great bit of code! exactly what I was after.
I also had a to make a small change in default.asp to look for the file extension rather than the type. Apart from that, works a treat!!! Well done!

Below is the code I have modified.

If objFile.Type = "Microsoft Access Application" Or right(lcase(objfile.name),4) = ".mdb" OR objFile.Type = "MDB File" Then
(If this comment was disrespectful, please report it.)

 
9/12/2002 3:57:35 PMAndy T.

Ok, that was the last straw. I fixed the with the program not finding any databases. It was usually related to countries foreign to the US.

If you do not see my answers to any of the above issues, it is because I answer most questions by e-mail. I generally answer all issues within the hour during the week, so just let me know if you have any problems and I will help.
(If this comment was disrespectful, please report it.)

 
10/14/2002 9:57:46 PM

nice code, however, i get this error after a successful login:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/dbeditor/Default.asp, line 91

800401f3

the pages are in c:\inetpub\wwwroot\dbeditor

the database is in c:\inetpub\wwwroot\dbeditor\database

not to worry. i haven't snapped out yet.
(If this comment was disrespectful, please report it.)

 
12/9/2002 1:57:08 AM

Hey SMOKIN application
Downloaded and loaded on the server, changed the path and bang! Editing all 12 of my .mdb access databases.

I have been using a crude one which I created but now after seing this! I will delete my crude one in a few days after I play with this one

GREAT JOB!
(If this comment was disrespectful, please report it.)

 
12/16/2002 11:41:39 PM

Are you able to take the search field and hard code it to only show one specific field??? I tried to do it, and I think I'm real close, but don't know alot about ASP to do it !! :o)
(If this comment was disrespectful, please report it.)

 
12/18/2002 10:37:25 PM

YOU ROCK MAN... This is good stuff
(If this comment was disrespectful, please report it.)

 
1/28/2003 4:59:38 PM

I can not get it to update, delete, or add records in any of my databases. I even tried modifying the dbeditor databse given in the zip file. Is there something outside of the code (like in IIS or Access)that I need to do, to get it to work?? Maybe something wrong with connection?? When I hit the update button, all it does is intialize the records back to it's original for before I modified data. (No changes to database). Please help if possible??
(If this comment was disrespectful, please report it.)

 
2/24/2003 3:54:02 PM

Great code, just one question... How can I prevent users with login access (i.e. they are setup in the LOGIN table of the dbeditor database) from accessing the dbeditor databes to view or change other users logins? I tried making the DB password protected, but when I did, the script kept blowing up.
Thanks, Pat
(If this comment was disrespectful, please report it.)

 
2/25/2003 12:25:39 PM

Great piece of code and has solved most of my problems except one...I am having problems with the field type and size when displaying the data after performing the query. All the fields are the same size and type (text). When I have a field size set to 255 in my access database it does not show up as a textarea as prescribed in your code with your selct case statements.

Any ideas?
(If this comment was disrespectful, please report it.)

 
3/30/2003 1:57:58 PM

Hi - I am having a problem with the login page:

It hangs when I submit the USERNAME and PASSWORD. My database path and include file paths are correct - can you help me out?
(If this comment was disrespectful, please report it.)

 
3/31/2003 9:47:34 AMAndy T.

Disable Norton Antivirus script blocking completely, or exclude the "dbeditor" directory from being scanned for malicious scripts.
(If this comment was disrespectful, please report it.)

 
4/3/2003 3:24:16 PM

Hi there i am very new to this ASP Stuff, can u PLEASE tell me the process of setting up this code on my machine, it would be much appreciated, thanks alot
(If this comment was disrespectful, please report it.)

 
7/20/2003 10:31:40 PM

Very good code.
(If this comment was disrespectful, please report it.)

 
10/22/2003 6:11:30 PM

Hi,

Great Code, but would appreciate a comment on the error message I receive after selecting the required database from those listed on my domain (I have tried all the db's but they all return this error message):-

"Database connection failed
When connecting to the database, the following error(s) occured:

501 - Illegal assignment"

Any advice appreciated

Many thanks - Chris


(If this comment was disrespectful, please report it.)

 
3/13/2004 8:20:26 AM

I have the same problem as Chris ie
"Database connection
failed
When connecting to the
database, the following error(s)
occured:

501 - Illegal
assignment"
Again I've tried all the DB's I have. I cant seem to find help anywhere else so I'm giving it a go here, even tho' I've noted that nothing has been added for a long time :o))
Hope you can help as I'd really love to use this editor.
Many thanks
Sue
(If this comment was disrespectful, please report it.)

 
4/14/2004 10:33:23 AM

Same problem as above:
'501 - Illegal assignment'
Any workaround(s)?
Thanks.

(If this comment was disrespectful, please report it.)

 
4/28/2004 4:12:07 PM

Same problem as above:
'501 - Illegal
assignment'
Any
workaround(s)?
Thanks.


(If this comment was disrespectful, please report it.)

 
8/7/2004 1:13:30 AM

This is great code but I cannot get updates or inserts to work. On update, it times out. I'll look into it with some debugging, just not sure if you had resolved this (George mentioned it above). Also, on inserts it acts as if it worked with no errors, but the record doesn't get inserted. I really hope I can get this to work, since it's very cool, but right now only 1/3 functional.

thanks
dode
(If this comment was disrespectful, please report it.)

 
8/27/2004 4:54:30 PM

I have tried every permutation of path string i can think of in the Const DB_FOLDER_PATH =
(If this comment was disrespectful, please report it.)

 
8/27/2004 4:57:55 PM

I've tried every permutation of path I can think of in the DB_FOLDER_PATH variable and still can't get it to work. I hvae also tried hard coding the path to the dbeditor.mdb file, still nothing. I am running on IIS5.0, and have many other .asp scripts running.

My websites are on the D: drive in a non-default location for security and space reasons, is there any possibility this could affect the scripts?

(If this comment was disrespectful, please report it.)

 
12/5/2004 10:58:33 PM

It is not often I give feedback to an Editor, however I have found this code written very clearly and easy to understand and a very useful application. I take my hat off to the Author...
(If this comment was disrespectful, please report it.)

 
1/25/2005 4:28:58 PM

I've been looking for code like this and am glad to have found it. But I get to see my databases, but when I try to update a row, nothing happens, original content re-appaers, delete ti;es out and add doesnt work...

Is this an authorisation issue ? or how do I solve this ?
(If this comment was disrespectful, please report it.)

 
1/25/2005 4:29:57 PM

I've been looking for code like this
and am glad to have found it. But I get to see my databases, but when I try to update a row, nothing happens, original content re-appaers, delete times out and add doesnt work...

Is this an authorisation issue ? or how do I solve this ?

(If this comment was disrespectful, please report it.)

 
5/13/2005 4:25:34 AM

this code is cool. please help me solve the "501 - Illegal assignment" error message
(If this comment was disrespectful, please report it.)

 
2/6/2006 10:02:01 AMLawrence Wagerfield

Great Code. A real shame it uses session variables (the devils work!!!).

Runs great on the local version of my site, but on the WWW version of my site, it doesnt (it is very volatile with session variables).
(If this comment was disrespectful, please report it.)

 
9/27/2006 11:57:28 AMWayne Smith

Brilliant!! After a bit of fiddling it worked perfectly!

One thing, it didn't detect memo fields so in browse.asp on lines 92 and 139, change them to: case 200, 129, 203, 201

Many thanks for sharing.
(If this comment was disrespectful, please report it.)

 
10/10/2006 5:09:46 PMsherzig

I just wanted to get another recent post on this article in case anyone is considering downloading. I had no problems implementing these pages. Once I got started, I began to see the true power of this straight-forward approach. I have added the functionality of being able to add new tables to the database and also new fields to any of the tables within any of the available databases. No more do I have to sync my database (after hours to help ensure integrity!) copies first before making changes to the tables. Thanks for some swell code.
(If this comment was disrespectful, please report it.)

 
11/28/2006 2:10:45 PMGina

THis is an awesome code. I am having a problem now that I didn't have before. Update, add, and delete are not working. Any help would be appreciated.
(If this comment was disrespectful, please report it.)

 
5/3/2007 12:16:46 AMpin8all

This code is fantastic, I use it on our company intranet for easy updating of everything from phone lists to sports draws. I wonder, though, is there any way to sort the data (for instance alphabetically on a particular field) so when new names are added to the phonelist database for example they appear in dbeditor in alphabetical order rather than on the last page of the dbeditor screen? Many thanks :)
(If this comment was disrespectful, please report it.)

 
12/17/2007 11:32:22 PMTanya

Howdy;

I've slowly been trying to get this code to work online; however, my latest error is a '501' error.

removed the login/password box. There is only one database accessed, with multiple tables. Do yo know how to fix this?

Cheers
Tanya
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.