Skip to Content
0
Former Member
Mar 26, 2009 at 09:01 PM

VB6 app getting Database Vendor Code: 17 - failed to open connection

36 Views

Hello,

I am trying to run an application that generates a report which was written in VB6. The report was written in Crystal Reports 11.0. It worked well on the old server.

We got a new server. Loaded SQL Server 2005. The boss had to buy Crystal Reports 11.5. We have tried to run the report, but it is failing. I can open the report in the Designer. We are using "sa" in the connection string.

The report is built on a stored procedure. I logged into SQL Server with the sa account and was able to run the stored procedure. I've checked to make sure the path is valid. The credentials are being passed by an ini file and that checks out.

I'm not sure what else to look at.

With Report.ExportOptions

.PDFExportAllPages = True

.FormatType = crEFTPortableDocFormat

.DiskFileName = strTargetDirectory & "\" & strFilename & "." & "pdf"

.DestinationType = crEDTDiskFile

Report.Export False

.ExcelExportAllPages = True

.FormatType = crEFTExcel97

.DiskFileName = strTargetDirectory & "\" & strFilename & "." & "xls"

Report.Export False

End With

It fails right at the Report.Export line.

Thanks for your help.