views:

203

answers:

1

I'm calling a COM library from .NET through a interop assembly and getting the following error:

System.Runtime.InteropServices.COMException(0x80040200): Internal error (ADODB.Connection, -2147467259, Property value is invalid. Make sure the value is typed correctly.)

I have a test and a production version of the same external system. When calling the test system through the COM library everything works fine but when calling the production system through the COM library I get the error described above. I only have to change a computer name in a connection string to switch from test to production so I assume that the cause of this problem is some difference between the test and production system, not my program.

How do I troubleshoot this error when I do not have the source code to the COM library?

I've googled the error "-2147467259, Property value is invalid. Make sure the value is typed correctly." but there is little to read about this error. The message itself is pretty clear and perhaps there is nothing more to it than to find out what property of the connection is set with a wrongly typed value, but I still wonder if there is something to learn about that particular error that can make me solve this without the source code of the COM library.

The Properties collection of Connection is used for provider specific settings. The provider in my case is SQLOLEDB.1. Where can I find out the possible properties of this provider?

A: 

I received this error using ADO in VBA behind Excel. Apparently you cannot change [DefaultDatabase] on an open connection.

Dan Meller