Y'herd thisun? 

“Zubrin, XCOR's Greason, NSS CEO Hopkins and Buzz Aldrin discuss the future of Human Spaceflight at a forum held at the Downey Columbia Memorial Space Center August 23rd 2010”

from this exclusive video by Smith

TaggedCoding, Database, DotNet

If you're a big iron RDBMS coder, consider that dynamically created Jet files as middleware have come in very handy for lots of folks using Oracle and SQLServer in the enterprise, so this is not just a power for those using Jet as a core source.

Years ago we noticed that we were spending more time writing DAO object code than working with data. So we took an afternoon and wrote the first DBCodeCreator. It saved us lot of time and other devs seemed to like it so we started giving it away on the sitelett.

A couple of years later ADO/x 2.1 finally made doing data object creation worthwhile so we re-wrote the functionality and added some gui features including checkable listboxes so devs could pick exactly the objects they needed to make. (That became an even more popular download than the DAO version and was recently featured in Mike Gunderloy's Sybex Press book "ADO AND ADO.NET Programming".)

Like everything else .Net, converting this applet to .net was not exactly a simple a port, but a bit of experience later it was done. And now, like the other versions, it's free for you.

If you've used any of the other releases, then running the version should be pretty obvious. You press the "Choose Source" button and pick a Jet database then you watch the tables, Views (non-parameter queries) and Procs (parameter queries) load up into the list boxes.

Check the objects you need to put in your new databases. As with the previous versions, if a View/Proc is checked then all of the tables it requires will automatically be checked, and if you uncheck a table, all of it's dependant Views and Procs will be un-checked. Plus, right-clicking a View/Proc pops up a context menu letting you see the Command Text (helpful for Unions which do not expose BASETABLEs and so can't automatically deal with their related objects).

When all the objects you need are checked, just press the "Make /Show Code" button and the ADO/x code is written for you and displayed in the rtb.

You can copy the generated code to the clipboard or choose to have the app write it into a *.vb module file.

No muss, no fuss ;-)

As with all the previous versions, you get all of the indexes and all of the column properties, even the undocumented ones. The caveat being that relations are not dealt with (they are not a major performance booster to most Jet apps).

In case you're wondering if this writes code ... it's doesn't. does not have any of the functionality of ADO/x. Maybe when the connected cursor library is released it will have some good features, but we'll have to wait and see. For now, the only way to programmatically create a Jet database is via Interop. In the source of the applet there is a bit of utility code written with but that was just to show that and can peacefully exist in a single assembly, the use of added nothing special to the end result.

In the zip, you'll get the exe and, the two Interop.ADO dlls and, for non users, the PIA adodb.dll. Just pop all of these in a folder on your machine and let it start writing your ADO/x code. To use that code, just drop the created module onto a project tree and call the entry point like this:

Dim bDone as Boolean
bDone = MadeNewAdoJetDB([New Path],[Jet3NotJet4], [New password])
if bDone then Messagebox.Show("Done!")

Click here to get the exe. (Just 60k)

As with the other versions, the source code is available for free.  Agreement is that you won't publish and call it your own [funny, but it's been called to our attention a couplea codeproject times :) ]).  If you agree to that, then here you are

And, for a lot more Jet information, poke around the Database Tools & Tips pages.

Hope it helps!

Robert Smith
Kirkland, WA

home     who is smith    contact smith     rss feed π
Since 1997 a place for my stuff, and it if helps you too then all the better