1

Topic: Choice dll ADO in winXP win7 win8 (8.1) and win10

Hello dear GURUS!
I need your councils about following questions:
1. It is necessary that the program for operation with a database correctly worked on different Windows versions
winXP win7 win8 (8.1) and win10 using library ADO
In directory C:\Program Files (x86) \Common Files\System\ado there is a heap dll.
Prompt please what of from these dll to import for this or that Windows version
Google gives usage examples msado15.dll msado20.dll...
It would be desirable to know what dll in what cases it is used (something like the table of correspondences).
Databases - (Access MSSQL MySQL).
2. If the choice dll depends on OS how program to connect the necessary library?
I can define the version of OS the user function. But to register the directive #import in a function body it is impossible
Whereas to learn the version of OS without usage of the user function, that in the beginning of a file with the code
To register necessary dll
Or the directive #import to register all variants;
And in the program, depending on OS to use calls of functions from necessary dll?
Thankful in advance for any help

2

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

wrote:

1. It is necessary that the program for operation with a database correctly worked on different Windows versions
winXP win7 win8 (8.1) and win10 using library ADO

It is necessary to install with the distribution kit of your program MDAC
The program should be only 32-bit.

3

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Eolt, thanks for MDAC
And what in most windows initially is not present msado15.dll msado20.dll and .?
And how into question account 2 (a program choice of connection)?
What approach here is necessary?
Thanks.

4

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Eolt wrote:

It is necessary to install with the distribution kit of your program MDAC
.

And what, in most windows initially there are no necessary libraries?
Here that writes microsoft under your link:
"Microsoft Data Access Components (MDAC) 2.8 SP1 contains the same principal components of data access, as OLE DB Microsoft SQL Server, and driver ODBC. The fitter of version MDAC 2.8 SP1 installs the same principal components of data access, as Microsoft Windows XP SP2 operating system."
I so understood that in all Windows versions all it is... Or I not did not understand something

5

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

wrote:

And what, in most windows initially there are no necessary libraries?

In a question has been mentioned XP. How much I remember, in bare SP2 was not present MDAC, and into account SP3 too is not assured.
About pure Windows 10, too . And in remaining it like is everywhere. If specially it did not delete.
And still it is precisely, by the machine where there is a 32-bit Office so it is included into the distribution kit of office.
That from VB it was possible connects to bases through ADO.

6

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

Prompt please what of from these dll to import

It is not necessary to import anything from DLL. ADO works on the basis of an OLE DB and which servers
Automations to create - dares on the basis of the information in the register.

7

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

Eolt, thanks for MDAC
And what in most windows initially is not present msado15.dll msado20.dll and .?
And how into question account 2 (a program choice of connection)?
What approach here is necessary?
Thanks.

There not only these two dll. It is more than them, and they with dependences. The part is a COM DLL, they need to be registered in the register.
Easier simply to include in the installer of your program - fitter MDAC, and to try to deliver it in the end of installation of your program. If MDAC already costs, its repeated setting does not happen.

8

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Once again I will specify questions.
1. Prompt please where it is possible to esteem about assignment dll, allocated on the address:
C:\Program Files (x86) \Common Files\System\ado\(for 64-bit OS)
C:\Program Files\Common Files\System\ado\(for 32-bit OS)
And they are supported by what versions of OS?
One is necessary to me in the program only dll which which will work in specific OS for example msado15.dll
2. How PROGRAM DYNAMIC to connect the necessary library ADO for given OS?
Variant 1 - to Define the version of OS to the directive declaration #import (as?), and then
For example
if....
#import "C:\Program Files (x86) \Common Files\System\ado \ msado15.dll " rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")
endif
If msado15.dll is present at all necessary Windows versions (XP, Vista, 8, 8.1, 10) it is possible to consider the given topic closed.
If is not present - that I will continue searches of the answer to the question
Variant 2 - to Declare #import *.dll for each OS, and in a function body on operation with basis to define the version
OS and to use functions of the necessary library
Variant 3 - your variant
Thanks

9

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Dimitry Sibiryakov wrote:

it is passed...
It is not necessary to import anything from DLL. ADO works on the basis of an OLE DB and which servers
Automations to create - dares on the basis of the information in the register.

And it is possible how to work slightly more in detail with basis without this line on the basis of the register
#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")
And on the basis of the register data?
Strongly do not kick please
Thanks

10

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

and on the basis of the register data?

CoCreateInstance ("ADODB.Connection")

and further everywhere.

11

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Microsoft covers technologies ADO (obosralis-c) so to ask questions concerning far plans of compatibility irrationally.
https://msdn.microsoft.com/en-us/library/ms810810.aspx

12

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

Once again I will specify questions.
1. Prompt please where it is possible to esteem about assignment dll, allocated on the address:
C:\Program Files (x86) \Common Files\System\ado\(for 64-bit OS)
C:\Program Files\Common Files\System\ado\(for 32-bit OS)
And they are supported by what versions of OS?
One is necessary to me in the program only dll which which will work in specific OS for example msado15.dll

Anywhere. It  the information Microsoft and it entirely on conscience of the company. And it not only can be different in different OS, but also change in lifetime of one and those the machine. Arrived to the client next "security update" and alja-ulju.

Arbit wrote:

2. How PROGRAM DYNAMIC to connect the necessary library ADO for given OS?

Simply open a connection.

Arbit wrote:

the Variant 3 - your variant

to Use ADO it is necessary in Visual Basic and its cousins. To use ADO in With ++ it is silly. Absolutely any scoring in convenience of a spelling of the code, loss plus on  conversions of the data between the DBMS and client software program driver.
ADO it  over ODBC and OLEDB drivers intended for embedding in Visual Basic. In consequence ADO tightened and in other languages, but only in VB with it to work conveniently.

13

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Dimitry Sibiryakov wrote:
CoCreateInstance ("ADODB.Connection")

and further everywhere.

Thanks, I will try!
And if there is a bare system without office or MSSQL, it too works?

14

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

White Owl;
ADO it  is pure over OLEDB, ODBC the leads life
On a C ++ with DO it is slightly less than literary trash than with OLEDB
And  similar slightly confuses connection dll for autogeneration
Titles at compilation with usage COM at execution

15

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

The isokerf, well thank God, and that I already almost became sad! smile
I just study, and likely incorrectly asked a question.
Application is written under win32 (studio 2013)
I use class ADODB for operation with a database
The heading file contains the next line:
In win32 it will be

#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")

In win64 it will be

#import "C: \[b] Program Files\Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")

It is necessary For me:
To define digit capacity of system and depending on it
To register in a heading file of my class the necessary variant of a line.
Question - as it correctly to register in a heading file?
Still a question:
Whether all "bare" systems windows: XP, Vista, 8.0, 8.1, 10
Comprise the given library msado15.dll , or it will be necessary to install by the machine of the user
MDAC necessary.? If to install MDAC, what and on what Windows version
Thanks

16

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Again nonsense wrote
On the contrary in win32 - Program Files
And in win64 - Program Files (x86)

17

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

to register in a heading file of my class the necessary variant of a line.
Question - as it correctly to register in a heading file?

Libraries depend on digit capacity of application, not systems. Accordingly, most likely
Will work so:

#ifdef _WIN64
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF")
rename ("BOF", "ADOBOF")
#else
#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll"
rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")
#endif

18

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Dimitry Sibiryakov wrote:

Libraries depend on digit capacity of application, not systems. Accordingly, most likely
Will work so:

#ifdef _WIN64
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF")
rename ("BOF", "ADOBOF")
#else
#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll"
rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")
#endif

Thanks, it that is necessary!
And on the second question?
Whether all "bare" systems windows: XP, Vista, 8.0, 8.1, 10
Comprise the given library msado15.dll, or it will be necessary to install by the machine of the user
MDAC necessary.? If to install MDAC, what and on what Windows version?
Thanks

19

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Dimitry Sibiryakov wrote:

Libraries depend on digit capacity of application, not systems. Accordingly, most likely
Will work so:

#ifdef _WIN64
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF")
rename ("BOF", "ADOBOF")
#else
#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll"
rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")
#endif

I here thought... Probably not absolutely so...
The matter is that in 32 bit Windows versions after all there is no directory Program Files (x86) and is only Program Files
Probably it is necessary = to define digit capacity WINDOWS
Either presence or absence in directory file system Program Files (x86) and depending on result
In a heading file to connect the necessary line?
Question opened
Thanks

20

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

The matter is that in 32 bit Windows versions after all there is no directory Program Files (x86) and is only Program Files
Probably it is necessary = to define digit capacity WINDOWS
Either presence or absence in directory file system Program Files (x86) and depending on result
In a heading file to connect the necessary line?

It is necessary only at compilation. What you do not know where  and under what platform?

21

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

wrote:

it is necessary only at compilation. What you do not know where  and under what platform?

Yes is not present, in compilation settings all is normal.
And all works,
But if the program is for example on windows XP, there a directory Program Files , instead of Program Files (x86)
And on my understanding at line

#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")

There should be an error, because of a wrong way?
Forgive if , well I do not catch up with this moment. sad(
Help to understand, please
Thanks

22

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

While wrote - !
Line

#import "C:\Program Files (x86) \Common Files\System\ado\msado15.dll" rename ("EOF", "ADOEOF") rename ("BOF", "ADOBOF")

It is necessary only to the compiler. And ready  will already contain all that necessary?

23

Re: Choice dll ADO in winXP win7 win8 (8.1) and win10

Arbit wrote:

it is necessary only to the compiler. And ready  will already contain all that necessary?

Yes.