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
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
oReg.OpenKey(".udl\ShellNew", , .T.)
oReg.SetKeyValue("FileName", JUSTFNAME(lcfile))
oReg.CloseKey()
There...I feel better now.
George
Ubi caritas et amor, deus ibi est