Important alert: (current site time 7/16/2013 3:46:48 AM EDT)
 

winzip icon

ADO Database Viewer/Editor

Email
Submitted on: 3/14/2000
By: Paul Mather  
Level: Intermediate
User Rating: By 116 Users
Compatibility: VB 5.0, VB 6.0
Views: 102686
author picture
(About the author)
 
     Have you ever needed to view a database on a computer without MS Access? Here's an alternative. It uses ADO 2.1 to open, view & edit MS Access, SQL server, DSN and Oracle databases. There are also a few features to let you add, rename and delete tables as well as purge based on a Date/Time field. Clearly not a replacement for MS Access, but you can distribute it to help troubleshoot. Automatically registers itself as the default database viewer for .mdb files on systems without a default already set. Otherwise, it becomes a second option when right-clicking. Its Biggest advantage is its all ADO. No DAO at all. Now you're able to modify older versions of Access databases when Access itself requires a conversion!! I recommend distributing MDAC 2.5 even if you have a 2.1 application. Microsoft seems to have fixed some of the install problems with the MDAC 2.1. Please Note that you MUST HAVE the Oracle client installed on your PC to use the Oracle connection!!http://www.microsoft.com/data/download.htm ** Updated 3/21/2000 **Added Password support for Access databases.Please vote!

 
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.
  3. Scan the source code with Minnow's Project Scanner

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.


Other 24 submission(s) by this author

 


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/14/2000 12:32:56 PMrjsoft

Simple and direct. I like it. Good job!
(If this comment was disrespectful, please report it.)

 
3/15/2000 12:39:48 AMVinda

Excellent piece of code specially useful in case the client/customer does not have Access or SQL client installed and the Dev wants to view the database during debugging.
(If this comment was disrespectful, please report it.)

 
3/15/2000 2:53:59 PMrweight

This is what I've been thinking of doing myself. Great job! Is there anyway to edit a particular table and change the default property of a field so any new records created will always have at least the default value? I can do this with Access, but many of my sites don't have Access and I need to change that field.

Thanks!

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

 
3/16/2000 9:54:05 PMVeeJay

Thanx. I needed this as I don't have Access and I need to check out a certain *.mdb. You're a star!
(If this comment was disrespectful, please report it.)

 
3/20/2000 3:37:56 PMChris

I really like the program and I can see the utility of it. One option I would add would be the ability to specifiy a password for the Access DB that is being opened because the program can't handle this scenario currently.

Thanks for the code and the program. It's really well-done.
(If this comment was disrespectful, please report it.)

 
3/23/2000 5:41:29 PMBrett

I've not looked at the code yet but I presume you are using ADOX to edit the database. I have had some problems setting the default value of a new field when allow nulls is set to true and also setting the allow null in an index . . . any ideas ??
(If this comment was disrespectful, please report it.)

 
3/24/2000 1:36:36 AMAndrew

The program is nice, but there are a few
error conditions that you should have it
trapped, or else the program will bombs out.
Keep it up.
(If this comment was disrespectful, please report it.)

 
4/13/2000 10:34:13 PMMisha

Can't download invalid Archieve


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

 
4/19/2000 6:45:54 AMconrad

very cool,what will happen if i stick 1 200 000 records in an access table with 9 rows, and how will it affect the speed at which i do queries?
(If this comment was disrespectful, please report it.)

 
4/19/2000 8:40:55 AMPaul Mather

You will see performance hits on tables with huge numbers of rows. However, it is much faster to use a data-bound grid to view the data then it would be to use a recordset and then run through each record adding it into a grid. To limit the query time, use the SQL statement field at the bottom to limit your search.
(If this comment was disrespectful, please report it.)

 
4/19/2000 8:49:20 AMNathan

Very slick. Very very slick. Would be nice if you could enumerate the Query collection as well. I have modified it to do so. I only needed this because some imported tables from Clarion(Topspeed) databases have funky non SQL compatible naming conventions. BUT, very slick code.
(If this comment was disrespectful, please report it.)

 
4/24/2000 11:50:51 PMMonk

God bless u
Keep it up.

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

 
5/22/2000 6:54:33 PMYuntan@mail.com

I am not able to run the program from VB6..
(If this comment was disrespectful, please report it.)

 
5/23/2000 11:52:05 AMhelp

it stops at commandline = command..

traced to registry calls.. couldn't find manually..

*sigh* anyone out there?
(If this comment was disrespectful, please report it.)

 
5/24/2000 1:45:24 AMWill French

Very, very nice job. Tremendous resource for code examples bundled in a program that is, in itself, very useful.
(If this comment was disrespectful, please report it.)

 
5/26/2000 11:26:25 AMDave

Great program! You did me a big favor. Keep up the good work!
(If this comment was disrespectful, please report it.)

 
7/23/2000 1:37:33 PMAndrew Juergens

This is great. I create database applications, and I don't need any of the stuff access has to offer. All i need is a thing to crate tables. This is great!!
(If this comment was disrespectful, please report it.)

 
8/22/2000 6:06:54 PMTom Williams

This looks as though it could be a great educational tool for me with regards to Oracle access via VB. I was wondering if you could give specifics regarding the Select Netork Database Type of "Oracel (Needs Client)". I have the oracle DBA software installed for version 8 and I don't seem to be able to connect without setting up an ODBC connection. Is this what you are referring to or have you found a way to bypass the ODBC?

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

 
8/30/2000 4:40:16 PMAnil Dantes

Good amount of ADO work done very well!!! Excellent...keep up the good work.

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

 
10/11/2000 5:00:12 AMdinh

This one is exactly what I need
(If this comment was disrespectful, please report it.)

 
10/17/2000 4:19:49 PMJoeKramer

I am having problems trying to access a Oracle database. I can seem to get to the DSN of it. But how would I open a group??? I don't get errors. I just don't seem to be able to view any data.

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

 
2/10/2001 2:47:36 AMelliot

I find this the work of a vb God. It is exactly what i need. For a while i thought the code for a similer program of access would be 10 times longer. But everything in it seems logical and makes sense. Excellent Job.
(If this comment was disrespectful, please report it.)

 
2/10/2001 10:54:11 AMPaul Mather

Hahaha, thank you. There are still some bugs in the program especially revolving arount the password protected Access databases. It's not perfect, but it sure is handy when your end user doesn't have Access and you need to troubleshoot your database. Enjoy! Thanks again. PLEASE VOTE!
(If this comment was disrespectful, please report it.)

 
3/15/2001 10:21:38 PMSynergy Designs

Amazing. This is great. If you added a create new database option, this would be even better than it already is. Exellent code.
(If this comment was disrespectful, please report it.)

 
3/16/2001 3:02:08 PMe002378

Can you help me with the command err. I really want to get this code up and running. It loads 8mb in 7 sec's. Really great work...
(If this comment was disrespectful, please report it.)

 
4/13/2001 10:15:51 AMChris Milne

Thanks. This is great!
I can only access my oracle database with the odbc style, the oracle specific ole thingy does not seem to work, not just with this program, always. OO4O works, any feelings about OO4O?

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

 
4/18/2001 5:40:36 AMRADU

Excellent example ! Learned alot from it ! Thanks !
(If this comment was disrespectful, please report it.)

 
11/7/2001 4:11:51 AMARNO

Could you explain how to access an Oracle Database.
It seems many people have the same pb

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

 
4/2/2002 4:58:38 AMRegX

Any odbc compliant database can be accessed pretty much the same way through VB and rdo or ado. I do not use Oracle, but would be happy to post example connecting to Mysql server on unix. Any odbc compliant DB should be the same and is why odbc is exist in the first place.
(If this comment was disrespectful, please report it.)

 
4/21/2002 2:18:05 PMRamu

Excellent piece of work, i never found anything else so useful as this bit, keep up the good work
(If this comment was disrespectful, please report it.)

 
5/30/2002 8:15:31 PMJamie

This is a great tool especially since I do not have access. But how can I create primarykeys using this? I need autoincremented
(If this comment was disrespectful, please report it.)

 
6/16/2002 9:09:11 AMS. Vasardanis

This is an excellent tool that every serious programmer should have. I have spoted though a very small omission. If you try to compact a password-protected database you get an error that the password is invalid. You can solve that by adding to the startingType string the following : & "Jet OLEDB:Database Password=#####" where ##### is your password. Hope that helps. Keep up the good work!
(If this comment was disrespectful, please report it.)

 
7/8/2002 3:24:19 AMZvika Sonis

good work and very usefull

the exe file works good.

in vb6 inveroment it stops at commandline =
command..

and i get This ..

Cant find project or library

please some one help !!!
(If this comment was disrespectful, please report it.)

 
7/8/2002 3:27:11 AMZvika Sonis

My Email is zvka@yarpa.co.il

this is for my comment befor
(If this comment was disrespectful, please report it.)

 
9/2/2002 3:07:10 AM

You are a legend. Very useful for use in SQL Database Administration applications. I especially like the way you use the registry to remeber the settings.
5 stars
(If this comment was disrespectful, please report it.)

 
10/1/2002 5:56:10 PMZorg

Amazing, best Access Editor Ive ever seen (apart from access itself which i dont have anyway)
(If this comment was disrespectful, please report it.)

 
12/11/2002 3:11:06 AMGarfield_X

Great code, but what i'm missing comments throughtout the code.
Why are you using the lockwindow statement?
(If this comment was disrespectful, please report it.)

 
1/13/2003 2:21:52 PMIssac

sweet...exactly what i was looking for.

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

 
3/5/2003 8:25:44 PM

thanks a lot!! it's an excellent piece of work,it's exactly what i need!!
(If this comment was disrespectful, please report it.)

 
3/10/2003 11:10:23 AM

Frankly, this is a piece of Art. Thanks for sharing it. I wish it had capability to dump some of the queries to Excel. I wonder if you have done any more development on it. Thanks again for one of the best utilities I'd found in PSC.
(If this comment was disrespectful, please report it.)

 
5/28/2003 9:56:22 PM

Great! u really do me a favor!!!
3k u so much!!!
bst rgds
(If this comment was disrespectful, please report it.)

 
5/30/2003 6:04:02 AM

GREAT ! 5 globes for you... again ! :)
(If this comment was disrespectful, please report it.)

 
6/2/2003 11:54:25 AMKeith Stanier

Great code but. I don't like:

"Automatically registers itself as the default database viewer for .mdb files on systems without a default already set."

You can check if Access is registered in the system before changing anything.

If your using Msadodc.ocx, Msdatgrd.ocx, Msflxgrd.ocx why don't you use Comdlg32.ocx?

Good work, 5 globes.
(If this comment was disrespectful, please report it.)

 
6/9/2003 12:10:15 PMTom Dewey

Very nice code, especially when a friend gives you some SQL Instructions and you only have a copy of MSDE :)
(If this comment was disrespectful, please report it.)

 
6/17/2003 12:01:23 AMFunnyPic Huh

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

 
10/18/2003 4:29:53 AM

Your fery good, I Like your VB
(If this comment was disrespectful, please report it.)

 
4/14/2004 5:32:52 PMWebGuy

an undo would be nice (i guess i haven't really looked but ctrl Z isn't it). MOST EXCELLENT PROJECT THOUGH *****
(If this comment was disrespectful, please report it.)

 
7/6/2004 5:13:32 AM

Brilliant. Just what I needed - this has saved me a lot of time. Thank you.
(If this comment was disrespectful, please report it.)

 
9/1/2004 11:20:55 AM

excellent program. the best i have seen so far of its kind....but far too complicated for a newbie like me to understand. I would like to know one feature though, how do you achieve the "open access database" function.
(If this comment was disrespectful, please report it.)

 
2/21/2005 6:03:53 AM

This is exactly what i need
Thanks
(If this comment was disrespectful, please report it.)

 
4/19/2005 9:26:14 PM

excellent program!!!!
thanks a lot.
(If this comment was disrespectful, please report it.)

 
9/14/2005 2:03:56 AMmarcelo t mayuga

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

 
11/22/2005 5:13:50 PMGreenEye2oo4

Good Code. Love it dude.
(If this comment was disrespectful, please report it.)

 
1/16/2006 11:01:18 AMOtt

Now I can go into an interview with confidence...GREAT WORK!!!
(If this comment was disrespectful, please report it.)

 
2/22/2006 9:39:57 AMmr_bishy

works, but for my particular set up here, odbc with oracle, this gives me problems:
adoData.Refresh
(If this comment was disrespectful, please report it.)

 
2/22/2006 3:25:59 PMPaul Mather

Yes, I'm sorry about that. When I wrote this code, I had access to an Oracle database. I've updated it a few times since then and can no longer test it.... sorry.
(If this comment was disrespectful, please report it.)

 
10/7/2006 5:58:35 AMShaFuq31

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

 
2/18/2007 10:23:17 PMblackrose

wat an excellent system.... tnks 4 ur program... through dis i finish my proposal.. in titled" Cashering system"...
(If this comment was disrespectful, please report it.)

 
4/28/2007 7:26:52 AMkhalid

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

 
4/28/2007 7:29:42 AMkhalid

thank you very much
GOOD COOOOOOOOOOOOde
(If this comment was disrespectful, please report it.)

 
8/31/2008 10:23:13 AMtith

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

 
9/8/2008 1:11:11 AMjglim

thank for you ADO Database Viewer/Editor
(If this comment was disrespectful, please report it.)

 
12/26/2008 9:17:16 AMKiran

Excellent work, thanks a lot.
(If this comment was disrespectful, please report it.)

 
11/21/2009 1:09:10 AM

thanks a lot for this
its for me fantastic.
(If this comment was disrespectful, please report it.)

 
10/13/2010 7:38:03 AMHarvie

WEW! INCREDIBLE IDOL!
(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.