Can't find project or library - Access 2003

  • Thread starter Thread starter JCCDevel
  • Start date Start date
J

JCCDevel

Hello All,

I am trying to introduce an update to an existing MS Access Data
Project. It works fine on my pc but when I try installing it on my
testers pc's, I get this error:

Can't find project or library
When I debug it on user's pc, the offending line is this:

Public srv1 As SQLDMO.SQLServer

I went into the references box and can see that the reference is
missing and I can repair it at their pc, but it won't be possible to
do that on all affected pc's. How can I keep from introducing this
issue? The reference on my pc is correct and I ensured that I have the
most recent version.

Just hoping somebody may have come across this before.

Thanks in advance for your time!

JCC
 
Remove the reference and replace the early binding with late binding:

Public srv1 As Object
set srv1 = CreateObject (SQLDMO.SQLServer)

Maybe the operator new will also work with late binding but I don't
remember.
 
DMO is a DLL library instaleed along with SQL Server/MSDE installation,
which may not present on user's computer (very likely). So, your code will
not run (regardless early binding or late binding).

Installing DMO withou installing SQL Server is a bit tricky. Search MS KB
would find you some information on this topic.
 
For late binding, CreateObject and GetObject are your only options.

For early binding, New will work with 99.99% of all objects out there, at least that I've ever come across, but I know CreateObject
is recommended by some people, as the code it generates behind the scenes more closely resembles how you would instantiate the
object in C, and apparently will occasionally work when New won't. I believe there was something about versioning or maybe
interface differences involved in there as well, i.e., if you were going to do CreateObject("ISomeClass.CompatibleInterface3"),
where "ISomeClass.CompatibleInterface" would normally create an "ISomeClass.CompatibleInterface1", for example. I'm afraid I don't
remember the specifics on that part, though, as I can count on one finger the number of times I've had to deal with a non-default
interface for something in about 15 years of VB programming, so I may be completely leading you down the garden path on that one. :)

Suffice to say, for most applications, using New for early binding is what most people do, so it should be fine; for late binding,
CreateObject and GetObject is all you've got.


Rob
 
Remove the reference and replace the early binding with late binding:

Public srv1 As Object
set srv1 = CreateObject (SQLDMO.SQLServer)

Maybe the operator new will also work with late binding but I don't
remember.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)















- Show quoted text -

Sylvain,

Thank you for your advice - the issue has been resolved!

I truly appreciate your time!

Julie
 
Back
Top