1 Attachment(s)
Start DBExplorer/DBBuilder from your application
The attached file contains a couple of procedures that you can add to your application that will start either DBBuilder or DBExplorer up with the workspace that is currently in use by your application. This is mainly for when you are working on a client's system, just to save you all that tedious mucking about with starting the utilities from an Explorer or Command Prompt window and going through the workspace selection dialog.
Oh yeah, it also sets dbAdminMode to DDB automatically for you. Of course, if the sysadmin has locked down HKEY_LOCAL_MACHINE, that won't do you much good. (This last weekend I ran into a system where I was locked out of REGEDIT, but the program could still write to HKEY_LOCAL_MACHINE, so this did the trick.)
If you've subclassed the Panel class, that would be a good place to put these procedures, then you can just set up secret shortcut keys, toolbar buttons or menu options to activate the utilities. The only thing these depend on is the classic DoStartDocument procedure which is included if you don't happen to already have it.
This should work on any version of VDF (tested on 12.1 and 14.0).
Re: Start DBExplorer/DBBuilder from your application
Cool!
Thanks Matt!!!!!!
BTW - re: your tag line: Betcha I was ready for that...
Re: Start DBExplorer/DBBuilder from your application
[quote=matthewd;189271]
Oh yeah, it also sets dbAdminMode to DDB automatically for you. [/quote]
You could just set it to ON instead of DDB. That leaves out the DataDictionary part. Not sure why you would like to have the DD files at the customer site (other than FastView and
VDFStruct)?
Re: Start DBExplorer/DBBuilder from your application
I was not aware that ON could be used on dbAdminMode. Learn something new everyday! The -d- option starts DBBLDR without the DD support though.
Re: Start DBExplorer/DBBuilder from your application
...and I havn't tried starting the dbBuilder with paramteres so the -d- option was new to me ;)
Re: Start DBExplorer/DBBuilder from your application
Thanks Matt, nice one!
BTW what's dbAdminMode? Can't find it in the Help Index.
Peter
Re: Start DBExplorer/DBBuilder from your application
Peter,
dbAdminMode is a registry setting. You can find it in HKEY_LOCAL_MACHINE\Software\Data Access Worldwide\Visual DataFlex\<version>\Defaults.
It is used with VDF14.0 and lower for telling Database Builder if it should operate in end-user mode (OFF), in table editing mode (ON) or DataDictionary mode (DDB). Since 14.1 the last option is not used anymore since DD maintenance is now fully in the Studio. Database Explorer uses the same registry value to determine if you can open the configuration dialog and click the readonly/readwrite icon.
Re: Start DBExplorer/DBBuilder from your application
Thanks Vincent, a very clear explanation.
BTW, on a completely different topic (and I know this isn't really the place), in your AccelMix.pkg you say you use a trick so that "a part of the code is executed as if the code was part of the key destination object". Are you saying that the trick simulates a
"Procedure <name> for <object>" syntax analogous to the "procedure <name> for <class>"?
Regards
Peter
Re: Start DBExplorer/DBBuilder from your application
Peter,
I am not aware of a AccelMix.Pkg, so I cannot really comment on that.
Re: Start DBExplorer/DBBuilder from your application
Oh! The source file says:
// Modifications:
// ~~~~~~~~~~~~~~
// 15/ 9/1996 Created by Vincent Oorsprong.
Guess it must be the other Vincent Oorsprong:D
It's a jolly useful package to automatically assign an accelerator key based on the letter following the ampersand in a button name.
Peter