Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to know whether it is using ADO ?

Hi,

I am writing a data entry sheet in Excel to store data in cells to a
database file. This entry sheet would be given to people using different
computers to enter their data respectively. This entry form would probably
not work if it is not making reference to ADO objects. The problem is : how
could I know, programmatically, whether it is making reference to the ADO
objects and how could I set reference, also programmatically, to ADO objects.

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default How to know whether it is using ADO ?

Not sure I understand your question.

If you use late binding, ADO simply needs to be present on oher users' Pc
and your code will work. If you use early binding, the reference to the same
object as on your machine must be possible: i.e. your users must have the
same version of ADO as you.

I'd use late binding and avoid all the early binding issues.

"KS Wong" wrote:

Hi,

I am writing a data entry sheet in Excel to store data in cells to a
database file. This entry sheet would be given to people using different
computers to enter their data respectively. This entry form would probably
not work if it is not making reference to ADO objects. The problem is : how
could I know, programmatically, whether it is making reference to the ADO
objects and how could I set reference, also programmatically, to ADO objects.

Thanks in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default How to know whether it is using ADO ?


AA2e72E wrote:
If you use late binding, ADO simply needs to be present on oher

users' Pc
and your code will work. If you use early binding, the reference to

the same
object as on your machine must be possible


It may not be a simple as that but late binding would still be the way
to go e.g.

Sub test()
Dim oStream As Object

On Error Resume Next
Set oStream = CreateObject("ADODB.Stream")
On Error GoTo 0

If oStream Is Nothing Then
' User may only have ADO version 2.1
' so exit gracefully here.
End If

' Code continues ...

End Sub

Jamie.

--

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



All times are GMT +1. The time now is 09:26 AM.

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"