Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Annoying MDAC
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Annoying MDAC
Miscellaneous
Thread ID:
00427536
Message ID:
00427536
Views:
54
Due to some unbelievable stupidity on my part, I was forced to uninstall a desktop copy of SQL Server I had setup for prototyping.

I just got finished with the re-install and during the process, I noticed that a message appeared saying that MDAC 2.1 was being installed. Naturally, this caught my attention, since SP4 requires MDAC 2.5, and once the install was finished, I checked the version of of the DLL to make sure that there hadn't been an overwrite of it (there hadn't).

Once again, however, the installation blew away my ability to create a udl link from the New menu from the Desktop or Windows Explorer. The reason being (this) time, the installation blew away the ShellNew key in the registry. Why does this do this ^(%@*!?

Anyway, that part of the rant over, here's some code that will restore the option from the new menu. It utilizes the registry class that's part of the FFC, so it must be in the local directory or on the Fox path
* Check for and create, if necessary the template file
lcfile = ADDBS(GETENV('WINDIR')) + 'ShellNew\mdac.udl'
IF NOT FILE(lcfile)
  lnhandle = FCREATE(lcfile)
  = FCLOSE(lnhandle)
ENDIF
SET CLASSLIB TO Registry.vcx ADDITIVE
oReg = CREATEOBJECT('Registry')
RELEASE CLASSLIB Registry
* Open and, if necessary, create the appropriate registry key
oReg.OpenKey(".udl\ShellNew", , .T.)
* Set the filename value to the template file
oReg.SetKeyValue("FileName", JUSTFNAME(lcfile))
* Close the key.
oReg.CloseKey()
There...I feel better now.
George

Ubi caritas et amor, deus ibi est
Next
Reply
Map
View

Click here to load this message in the networking platform