cancel
Showing results for 
Search instead for 
Did you mean: 

Method 'Value' of object 'IConnectionProperty' failed

Former Member
0 Kudos

I have an old VB6 app that I have been supporting for many years. The app has a form with a Crystal Viewer. My OS is Windows XP SP3, and I am using Crystal Reports 2008. The references in the app are for Crystal Report Controol 9; Crystal ActiveX Report Viewer Library 10.0; and Crystal Reports 9 ActiveX Designer Run Time Library. I have not made any changes to the viewer control, the references, or the version of Crystal Reports since 2008.

Last week I added a report built with Crystal Reports 2008. The report fails with the following error:

Run-time error '-2147417848 (80010108)':

Method 'Value' of object 'IConnectionProperty' failed

I have been able to trace it down to the following call:

crxReport.Database.Tables(1).ConnectionProperties("User ID") = <my user id>

crxReport is dimmed as CRAXDRT.Report

The code to open the report executes just fine:

Dim crxApplication As CRAXDRT.Application

Dim crxReport As CRAXDRT.Report

Set crxApplication = New CRAXDRT.Application

Set crxReport = crxApplication.OpenReport(<ReportName>)

When I put a breakpoint on the line of code that fails, I can retrieve the data from the object, and it is all correct (Field Names, Table Names, Connection String, etc.).

The code supports numerous other reports developed with Crystal Reports X, XI, and 2008 and has never failed since it was written over 6 years ago. Can someone give me a clue as to what the significance of this error is and how I might be able to correct it.

Thank you,

Jack

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Jack,

Moved your post to the Legacy SDK forum.

Interesting you got 9 and 10 runtime to work together, it should not because the entry points for the various API's can be different and likely are for most of them.

Could be they used some new function in CR 2008 that isn't supported in CR 9/10.

Try removing parts from the report to see if you can figure out what is causing the problem.

Another test is add that report to a new VB project and try previewing it, that may give you more info.

And see if changing the connection type from ODBC to OLE DB to Native, may be the CR DB drivers does not support something in the client.

First thing you should also do is update your app to either ALL version 9 dll's or all Version 10. Dont' mix them.

Don

Former Member
0 Kudos

I think I may have found the problem. I was using a file DSN to hold the database connectivity information, and that's what I used with in the "Set Datasource Location..." When I updated the file DSN to an OLE DB (ADO) - SLQOLEDB, with the datasource being the database itself instead of depending on a DSN, it works fine. I did check, and I have other reports using the same file DSN that work fine, but this report works 100% of the time when I use an OLE DB connection, and fails 100% of the time when I use the DSN with ODBC.

As far as the CR 9/10 issue, I built a new computer and installed CR 2008 on it, and those references are the only ones available. The only thing that I can think of that could have had anything to do with it is what is installed with VB6 SP6. I did remove the Crystal ActiveX Report Viewer Library 10.0 reference, and have not seen any issues with the viewer or any reports so far. It could be a holdover from previous versions, but it has been too many years for me to remember. If it continues to work through testing, I will leave it out so there will only be references to CR9 controls/libraries.

The ODBC vs OLE DB resolved my immediate issue, so I'm good with that.

Thank you,

Jack

0 Kudos

Good luck,

None of what you are doing was ever supported but good to see my suggestion fixed this issue.

Don

Answers (0)