Data Access Objects (DAO)

C

Chris

OK, after the extremely quick response with what turned out to be exactly
what I was looking for, I thought I'd try another.

I have written a quick VBScript in Excel to lookup in a database data that
was taking people 5 WHOLE DAYS to manually lookup. I have it down to 45
seconds. They are very happy, to say the least.

Only problem is when I try to run it on their computers. When I go into the
references, it lists that I had checkmarked the Microsoft Data Access
Components (2.6, I think) but has "MISSING: " in front of them. There are
about 3 different versions installed, with 2.6 being the latest. The DLLs
required are all present on the computer and I tried downloading and
running the install for MDAC again, though corporate would be unhappy about
the unauthorized installation and change on their setup.

There are about 4 computers that I tried this on all with the same results.
It works fine on my computer and a few others but these just have a
configuration issue that is different.

Any ideas on how to fix this? I tried all of the ADO options, all with the
same results. I could try dynamically loading the objects instead of using
References as I saw on a site while investigating the issue but that is a
workaround instead of a solution in this case.

Thanks for pointers!
 
K

keepITcool

I think you confuse VBscript with VBA.


to avoid "referencing issues" write your code LATEbound.

I suggest you develop your code for ADO 2.5 (WITH REFERENCES)
then edit the code to latebound for distribution.
and dont forget to remove the reference when you're ready.

Later versions will give you bug fixes, performance improvements..
but for most day to day uses give you little or no added features.


Dim adoCN as object
set adoCN = CreateObject("ADODB.Connection")
'if the line above gives a problem... THEN
'MDAC needs to be (re)installed on the machine
' OR at least the use regsvr.exe to reregister
' the msado15.dll in
' c:\program files\common files\system\ADO

With adoCN
.Provider = etc
.Open etc

note that if you use constants...
.CursorLocation = adUseClient

change them to the constants VALUES.
in immediate pane
?aduseclient
3

.CursorLocation = 3 'adUseClient




keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top