Forums

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF ReportWriter for .NET (v7.x)  /  Database connection error

Forum Thread - Database connection error

 Aug 25 2017 2:53 PM
I am working on a client project that uses DynamicPDF.   I am unable to get the PDF generation to work in my development environment.  I get the following error on all pdfs:   A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

The connection string/database being used is used and works fine in the rest of the app.   

Thanks for your help
 Aug 25 2017 4:26 PM
Posted by a ceTe Software moderator
Hello,

This error is most likely caused due to an invalid connection string. Please double check the connection string that is being provided to the dplx template and make sure it is accurate.

Thanks,
ceTe Software Support Team.
 Aug 28 2017 11:05 AM
I have double and triple checked the connection string and it is correct.  It is used elsewhere in our app and works fine to connect the the database. 
 Aug 28 2017 4:33 PM
To add to the mystery of this, if i change the signature of a stored procedure being called by the report so the parameters in the dplx file doesn't match the database, I get an error telling me that the # of parameters is wrong, so it is clearly able to connect to the database.  Yet as soon as I change it back to match I get the original error.
 Aug 28 2017 4:49 PM
Posted by a ceTe Software moderator
Hello,

We have looked in this further and there are no known issues in our product with regards to connecting to databases. If you are not using the latest build of the version you are licensed to use, please download it from the customer area and try it out.

If you still see the same error with the latest build, create a test console application and try calling the same stored procedure using the regular .NET classes. Once you successfully retrieved the data using .NET classes, create simple dplx file using the same connection string and stored procedure and see if you can generate the PDF with ReportWriter API.

In case the test application dplx throws the same exception, email the test application and the dplx to support@cete.com along with the full exception message including the stack trace and we can look into it further.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 6:55 PM.