Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Data Access Objects (DAO)

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Data Access Objects (DAO)


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


Chris wrote:

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!



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
setting Excel to reference microsoft activex data objects libraryfrom Access Laoballer Charts and Charting in Excel 0 March 25th 09 03:55 PM
Importing bound objects (bitmaps) from Access to Excel Sandy Excel Discussion (Misc queries) 4 January 10th 08 03:11 AM
access contains several objects explain the purpose of the four c Gord Dibben Excel Discussion (Misc queries) 0 May 11th 05 09:38 PM
Access data -work in Excel- save in Access s_u_resh Excel Programming 1 October 25th 04 12:52 PM
Displaying OLE Objects retrieved from MS Access Raj[_9_] Excel Programming 1 January 15th 04 08:37 PM


All times are GMT +1. The time now is 06:45 AM.

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

About Us

"It's about Microsoft Excel"