d10u4v
asked on
set database references at startup
Hi,
I have a database system I'm going to be releasing in my organisation and i need to make sure that certain reference are set at the startup so that certain modules will work correctly. The references are need to set are:
Visual Basic for Application
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft Office 12.0 Access Database Enine
Microsoft Outlook 12.0 Object Library
Microsoft CDO 1.21 Library
Microsoft ActiveX Data Objects Library
Microsoft CDO for Excahnge 2000 Library
Microsoft Office 12.0 Object Library
I knoe some of these are standard reference are are always loaded, but how can i make sure that the rest of them are always loaded at startup.
The CDO 1.21 is installed to the Database Folder when my MSI installs the database on the users computer, this could be stored in the System32 folder if needed.
Any suggestions would be very much appreciated.
Tom
I have a database system I'm going to be releasing in my organisation and i need to make sure that certain reference are set at the startup so that certain modules will work correctly. The references are need to set are:
Visual Basic for Application
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft Office 12.0 Access Database Enine
Microsoft Outlook 12.0 Object Library
Microsoft CDO 1.21 Library
Microsoft ActiveX Data Objects Library
Microsoft CDO for Excahnge 2000 Library
Microsoft Office 12.0 Object Library
I knoe some of these are standard reference are are always loaded, but how can i make sure that the rest of them are always loaded at startup.
The CDO 1.21 is installed to the Database Folder when my MSI installs the database on the users computer, this could be stored in the System32 folder if needed.
Any suggestions would be very much appreciated.
Tom
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If the reference is already loaded, how do you stop it from causing an error? Trying to load it again?
Tom
Tom
ASKER
If i create a package, do i use the runtime version?
Tom
Tom
Sub loadref()
on error resume next ' add this line
'Office
References.AddFromGuid "{2DF8D04C-5BFA-101B-BDE5-
'CDO for Windows 2000 Library
References.AddFromGuid "{CD000000-8B95-11D1-82DB-
End Sub
if you take note of the error number that you are getting, you can write an error trapping routine
on error goto refError
refError:
if err.number= then
err.clear
resume next
end if
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thus even users without the installed libraries will be able to work with your application.
Nic;o)