Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
hbj hbj is offline
external usenet poster
 
Posts: 35
Default Can't find project or library

On Tuesday, April 5, 2016 at 3:00:52 AM UTC+3, GS wrote:
"GS" wrote in message
Gary, ADO Library 6.1 is the current version of MS ActiveX Data
Object for Win7. Your 2.5 is a very old version.

Thanks, Peter. I have never installed any ado libs on this machine
deliberately, so I assume some software did this. Also, I have no
listings for any other versions and so if they should be there then
perhaps I have a similar situation to the 'missing' components
mentioned in the VB6 forum. I say this because all the newer
versions are in the folder with 2.5 but they won't register because
their 'entry point server' is missing. Looks like I need to find
replacements...


Distributing with the ADO reference can be problematic because as you
say, the entry point is different in respective versions, not even
backwards compatible (IOW not compiled as binary compatible). I don't
use it much myself but AIUI safer to develop with early binding, then
before distributing adapt to late binding and remove the reference.

On which point, Håkan it might be worth adapting your project to late
binding, then it'll probably pick up whatever ADO version is
installed, even Garry's 2.5! (assuming not using any methods only
available in the later version)

Peter T


Interesting!
After opening all the ADO libs and getting the error meg, they're all
now listed in References (even 6.1)!!! weird...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the moment VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1" located in C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One version of msado15.dll locates in "Program Files\..." but is that a correct dll? Which version should I use and where can I find teh correct version?

Håkan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Can't find project or library


"hbj" wrote in message
Interesting!
After opening all the ADO libs and getting the error meg, they're all
now listed in References (even 6.1)!!! weird...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


"
Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the moment
VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1" located in
C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One version of
msado15.dll locates in "Program Files\..." but is that a correct dll? Which
version should I use and where can I find teh correct version?
"

It might be 6.1, though msado15.dll is also 6.0 and 2.8 as there's nothing
new in terms of public methods. Right click it, Properties, Details and look
at File version and Product version. Try removing the MISSING reference,
then browse to your msado15.dll and see if you can add it.

BTW your Win7, is that SPI? If so maybe the dll is not fully installed. If
not SPI your dll is probably 6.0. Apart from that maybe there's something in
common in your setup with what Garry described which I can't replicate.

As I mentioned before, consider coverting your project to Late Binding.

Peter T





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Can't find project or library

FYI:
I have Win7 Pro x64 on this machine. I also see 2.8/6.0 Recordset and
Multi-dimensional TLBs. I believe the 6.1 tlb is the fix mentioned in
your link article.

Any projects I would have used ADODB with were dev'd on my XP machine
with then current 2.5 which I have not bothered to update because that
project is no longer Excel-based. (Now VB6.exe using fpSpread.ocx)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Can't find project or library


"Peter T" wrote in message
"
Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the
moment VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1" located
in C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One
version of msado15.dll locates in "Program Files\..." but is that a
correct dll? Which version should I use and where can I find teh correct
version?
"

It might be 6.1, though msado15.dll is also 6.0 and 2.8 as there's nothing
new in terms of public methods. Right click it, Properties, Details and
look at File version and Product version. Try removing the MISSING
reference, then browse to your msado15.dll and see if you can add it.


If you can't, simplest might be just to reinstall 6.1
https://support.microsoft.com/en-us/kb/2640696 x86 for Win7

You may need to remove and re-add the reference

Peter T


  #5   Report Post  
Posted to microsoft.public.excel.programming
hbj hbj is offline
external usenet poster
 
Posts: 35
Default Can't find project or library

On Tuesday, April 5, 2016 at 5:58:57 PM UTC+3, Peter T wrote:
"Peter T" wrote in message
"
Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the
moment VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1" located
in C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One
version of msado15.dll locates in "Program Files\..." but is that a
correct dll? Which version should I use and where can I find teh correct
version?
"

It might be 6.1, though msado15.dll is also 6.0 and 2.8 as there's nothing
new in terms of public methods. Right click it, Properties, Details and
look at File version and Product version. Try removing the MISSING
reference, then browse to your msado15.dll and see if you can add it.


If you can't, simplest might be just to reinstall 6.1
https://support.microsoft.com/en-us/kb/2640696 x86 for Win7

You may need to remove and re-add the reference

Peter T


SOLVED!
Thank you!

I found 2 files msado15.dll, one created 2009 and one 2010, neither of those accepted. I simply changed to ado28 which was listed in available reference list. What I'm still wondering, how on earth VBA engine complains about ADO in a statement with common command TRIM(....)? This only didn't give me any information on what is missing, least that ADO is missing???

Håkan


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Can't find project or library


"hbj" wrote in message
On Tuesday, April 5, 2016 at 5:58:57 PM UTC+3, Peter T wrote:
"Peter T" wrote in message
"
Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the
moment VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1"
located
in C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One
version of msado15.dll locates in "Program Files\..." but is that a
correct dll? Which version should I use and where can I find teh correct
version?
"

It might be 6.1, though msado15.dll is also 6.0 and 2.8 as there's
nothing
new in terms of public methods. Right click it, Properties, Details and
look at File version and Product version. Try removing the MISSING
reference, then browse to your msado15.dll and see if you can add it.


If you can't, simplest might be just to reinstall 6.1
https://support.microsoft.com/en-us/kb/2640696 x86 for Win7

You may need to remove and re-add the reference

Peter T


"
SOLVED!
Thank you!

I found 2 files msado15.dll, one created 2009 and one 2010, neither of those
accepted. I simply changed to ado28 which was listed in available reference
list.
"

Sure, the 2.8 would most likely work or even 2.5, but why not install the
6.1 (via the link above)

"What I'm still wondering, how on earth VBA engine complains about ADO in a
statement with common command TRIM(....)? "

Whenever there are any MISSING references String and DateTime functions are
particularly likely to fail unless fully qualified to the respective
library, eg
VBA.Strings.Trim()

Keep in mind if your file is ever loaded on a system without the 2.8 it will
fail again. Late Binding would usually avoid these problems.

Peter T


  #7   Report Post  
Posted to microsoft.public.excel.programming
hbj hbj is offline
external usenet poster
 
Posts: 35
Default Can't find project or library

On Tuesday, April 5, 2016 at 9:15:13 PM UTC+3, Peter T wrote:
"hbj" wrote in message
On Tuesday, April 5, 2016 at 5:58:57 PM UTC+3, Peter T wrote:
"Peter T" wrote in message
"
Peter, I use Windows 7 Enterprise 32-bit and Office 2007 Pro. At the
moment VBA requires (MISSING) "Microsoft ActiveX data Objects 6.1"
located
in C:\Program Files (x86)\Common Files\System\ado. (msado15.dll) One
version of msado15.dll locates in "Program Files\..." but is that a
correct dll? Which version should I use and where can I find teh correct
version?
"

It might be 6.1, though msado15.dll is also 6.0 and 2.8 as there's
nothing
new in terms of public methods. Right click it, Properties, Details and
look at File version and Product version. Try removing the MISSING
reference, then browse to your msado15.dll and see if you can add it.


If you can't, simplest might be just to reinstall 6.1
https://support.microsoft.com/en-us/kb/2640696 x86 for Win7

You may need to remove and re-add the reference

Peter T


"
SOLVED!
Thank you!

I found 2 files msado15.dll, one created 2009 and one 2010, neither of those
accepted. I simply changed to ado28 which was listed in available reference
list.
"

Sure, the 2.8 would most likely work or even 2.5, but why not install the
6.1 (via the link above)

"What I'm still wondering, how on earth VBA engine complains about ADO in a
statement with common command TRIM(....)? "

Whenever there are any MISSING references String and DateTime functions are
particularly likely to fail unless fully qualified to the respective
library, eg
VBA.Strings.Trim()


Ok, a little bit strange behavior, would expect the statement/command using that missing lib to trig the message...


Keep in mind if your file is ever loaded on a system without the 2.8 it will
fail again. Late Binding would usually avoid these problems.

Peter T


Late Binding/Early Binding. I'm sorry not understanding those methods.

Rgds Håkan
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Can't find project or library


"hbj" wrote in message
Keep in mind if your file is ever loaded on a system without the 2.8 it
will
fail again. Late Binding would usually avoid these problems.


"Late Binding/Early Binding. I'm sorry not understanding those methods."

The reference to the library in Tools/References "early" binds the the
library. It loads faster and gives all the intelisense and named constants,
useful while developing. Problems can occur when distributing the project if
the version of referenced object library is different. Hence develop with
the reference, distribute without the reference. Without the reference all
object references should be declared 'As Object', and any named constants
should be replaced with their intinsic values. The project can include code
that handles both methods, eg

In Project Properties, Conditional Compilation Arguments,
LateB = 0

#If LateB Then
' include ADODB constants used in the project
Public Const adLockReadOnly As Long = 1
#End If

Sub test()
#If LateB Then
Dim rsCon As Object
Dim rsData As Object
#Else
Dim rsCon As ADODB.Connection
Dim rsData As ADODB.Recordset
#End If

' code

#If LateB Then
Set rsCon = CreateObject("ADODB.Connection")
Set rsData = CreateObject("ADODB.Recordset")
#Else
Set rsCon = New ADODB.Connection
Set rsData = New ADODB.Recordset
#End If

' code

End Sub

Adapt the code as above for object variables and include any named constants
also as above.

Head all modules Option Explicit and do Debug/Compile, test the code

Then test as Late Binding: change the conditional constant to LateB = 1,
remove the ADO reference in tools/refs, again do Debug/Compile, test the
code.

In theory Early Binding is much faster, but in practice typically won't
notice any difference with Late Binding

Peter T


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - Cannot find project or library Goodenuff Excel Programming 2 January 15th 09 05:43 PM
Can't find project of library MG Excel Discussion (Misc queries) 3 May 19th 08 12:06 AM
Can't find project or library AnnapolisStar Excel Worksheet Functions 1 June 15th 07 04:02 PM
Can't find project or library Tyrone Excel Programming 0 December 19th 06 02:57 AM
Can't find project or library Roy[_5_] Excel Programming 2 February 22nd 04 03:48 PM


All times are GMT +1. The time now is 03:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"