Upgrading / Downgrading between AD0 1.5/2.1 
Author Message
 Upgrading / Downgrading between AD0 1.5/2.1

Hi!

I'm having a hell of a time trying to write a COM-Object that accesses
an Access database in VB6.

In the beginning all was bright and shiny, and it worked like a charm
(on my own machine that is). I use ADO 2.1

Then I registered my .dll on the Web-Server (NT4.0 SP5) and it didn't
work. This is a on-line production server and the error detail where
like this:

    error number: 430
    error description: Class does not support Automation or does not
support expected interface
    error source: esml

It turned out that the server was using ADO 1.5, whereas my .dll was
compiled with a reference to ADO 2.1. It wasn't easy to persuade the
administrator of the web-server to upgrade, he had heard horrible
stories about what could happen when you install the new MDAC, but we
agreed that we should make a complete back-up of the server and try it
out. It turned out that he was right. After we did that, nothing
database-related worked anymore.

Hmm... He restores the production-server, down-time only 2hrs :-(, and I
get a brilliant idea -- Why not register the old .dll on MY machine and
compile with reference to that? Easy said, easy done and so I do it.
Then I change the reference in my VB project to point to the old ADO,
and you know what? I get the same error as we did on the web-server

hmm.. strange, in order to at least be able to work i unregister ADO
1.5, and register ADO 2.1 --- but alas, now nothing database-related
works o my machine (oh well not from VB anyways, Access runs fine). This
is a bit of a bummer 'cause it's a highly customized portable with ASP,
PHP3, Visual Studio, MySQL, HomeSite and so on, the easy way of
reinstalling is an absolute last resort.

This is the error I get:

     error number: -2147467259
     error description: [Microsoft][ODBC Microsoft Access-driver] The
file "(unknown)" couldn't be found.
     error source: Microsoft OLE DB Provider for ODBC Drivers

     The error-description is in danish, so I've approximated a
translation.

Apparantly my program doesn't pass the name of the database to the ODBC
driver, but why?

Perhaps you're know thinking 'What horrible code is the guy writing?'
but rest assure, it is extremely mundane, here are the {*filter*} bits:

        Dim objConn As New ADODB.Connection
        Dim objRs As New ADODB.Recordset
        objConn.ConnectionString = "DRIVER={Microsoft Access Driver
(*.mdb)}; DBQ=" & App.Path & "\esml_ressw.mdb"
        objConn.Open     ' ---->   this is the line that triggers the
error
        Set objRs = objConn.Execute("select * from ViewAll Where
HTML_Elements.id = " & iResProfile)

Now for the questions:

    1. Is there an easy way to restore things on my own PC?

    2. What is the problem on the web-server? Any ideas on how to work
around it?

Any help would be tremendously appreciated since I have a deadline
tomorrow morning UAARGHH!

Latest: The deadline is surpassed, I had to make a temporary solution
with a textfile holding the data, somewhat a bummer :-(

Esben Maal?e

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 07 Jul 2002 03:00:00 GMT  
 Upgrading / Downgrading between AD0 1.5/2.1
Sounds like basically you have a versioning problem. There are several files
that need to be version synchronized and by doing what you did I think you
possibly broke the synch
You can probably get your machine to work OK if you reinstall Mdac 2.1. But
then to use ADO 1.5 you would probably find it easier to transfer your
source code to another machine that has only ADO1.5 and test it and compile
it and make the distribution program from there.

If you`re only using Jet with your app there`s some articles on the MS site
that give you the version numbers of all the files so you can check them, I
don`t have the link though, sorry.
Good luck.
--
Robert Dufour, MCP, MCT
President SGI IMS Inc.
www.sgiims.com

Quote:

> Hi!

> I'm having a hell of a time trying to write a COM-Object that accesses
> an Access database in VB6.

> In the beginning all was bright and shiny, and it worked like a charm
> (on my own machine that is). I use ADO 2.1

> Then I registered my .dll on the Web-Server (NT4.0 SP5) and it didn't
> work. This is a on-line production server and the error detail where
> like this:

>     error number: 430
>     error description: Class does not support Automation or does not
> support expected interface
>     error source: esml

> It turned out that the server was using ADO 1.5, whereas my .dll was
> compiled with a reference to ADO 2.1. It wasn't easy to persuade the
> administrator of the web-server to upgrade, he had heard horrible
> stories about what could happen when you install the new MDAC, but we
> agreed that we should make a complete back-up of the server and try it
> out. It turned out that he was right. After we did that, nothing
> database-related worked anymore.

> Hmm... He restores the production-server, down-time only 2hrs :-(, and I
> get a brilliant idea -- Why not register the old .dll on MY machine and
> compile with reference to that? Easy said, easy done and so I do it.
> Then I change the reference in my VB project to point to the old ADO,
> and you know what? I get the same error as we did on the web-server

> hmm.. strange, in order to at least be able to work i unregister ADO
> 1.5, and register ADO 2.1 --- but alas, now nothing database-related
> works o my machine (oh well not from VB anyways, Access runs fine). This
> is a bit of a bummer 'cause it's a highly customized portable with ASP,
> PHP3, Visual Studio, MySQL, HomeSite and so on, the easy way of
> reinstalling is an absolute last resort.

> This is the error I get:

>      error number: -2147467259
>      error description: [Microsoft][ODBC Microsoft Access-driver] The
> file "(unknown)" couldn't be found.
>      error source: Microsoft OLE DB Provider for ODBC Drivers

>      The error-description is in danish, so I've approximated a
> translation.

> Apparantly my program doesn't pass the name of the database to the ODBC
> driver, but why?

> Perhaps you're know thinking 'What horrible code is the guy writing?'
> but rest assure, it is extremely mundane, here are the {*filter*} bits:

>         Dim objConn As New ADODB.Connection
>         Dim objRs As New ADODB.Recordset
>         objConn.ConnectionString = "DRIVER={Microsoft Access Driver
> (*.mdb)}; DBQ=" & App.Path & "\esml_ressw.mdb"
>         objConn.Open     ' ---->   this is the line that triggers the
> error
>         Set objRs = objConn.Execute("select * from ViewAll Where
> HTML_Elements.id = " & iResProfile)

> Now for the questions:

>     1. Is there an easy way to restore things on my own PC?

>     2. What is the problem on the web-server? Any ideas on how to work
> around it?

> Any help would be tremendously appreciated since I have a deadline
> tomorrow morning UAARGHH!

> Latest: The deadline is surpassed, I had to make a temporary solution
> with a textfile holding the data, somewhat a bummer :-(

> Esben Maal?e

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.



Sun, 07 Jul 2002 03:00:00 GMT  
 Upgrading / Downgrading between AD0 1.5/2.1
Totally agree - I also think it's a versioning problem. I've
reinstalled MDAC 2.1 on my machine, but it still doesn't work. I've
also tried doing it with the Component Checker (www.microsoft.com/data)
which is a tool that supposedly helps you out of jams like this, only
it didn't work.

I must admit that I find it extremely poor that you cannot upgrade from
1.5 to 2.1 using the official setup program without breaking things, It
only makes things more surreal when you can't do it with the special
tool designed to cover for flaws in the setup program. Just letting a
little steam out here - sorry.

I'm afraid that I'll have to re-install the OS on both the server and
on my machine - highly annoying I must say.

Thnx anyway

Esben Maal?e

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 09 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem writing to Access 97 DB with ADO 1.5 and 2.1 (using ODBC)

2. Downgrading from mdac 2.5 to 2.1

3. Upgrade to COM+ 1.5

4. VB5EE setup wizard and mdac 1.5 (ado 1.5) problem

5. Upgrading PowerBasic 2.1 to 3.x

6. Upgrade from ado 2.0 to 2.1

7. ADO 2.1 SP2 upgrade and loss of Foxpro tables

8. Upgrading from ADO 2.1 to ADO 2.5

9. Upgrading from 2.1 to 2.5

10. Problems Upgrading from 2.1 to 2.5 with Async Command/Connection

11. Display 1.50 and not 1.5

12. Help; Centura 1.5, CDO

 

 
Powered by phpBB® Forum Software