cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Database Vendor Code 102

Former Member
0 Likes
2,718

So I am getting the below error.

I have verified the database in my report several times and reset the datasource location.   The report run a preview just fine.  So that seems to tell me that it has no problem connecting to the database and running the sql query.

I am loading and sending parameters to the report as follows...

        parmPCname = Session("pcname")

        parmReportDate = Session("productionDate")

        reportPath = Server.MapPath("MakingDuration.rpt")

        newMakingDuration.ReportDocument.Load(reportPath)

        newMakingDuration.ReportDocument.SetDatabaseLogon(username, password, server, database)

        newMakingDuration.ReportDocument.SetParameterValue("pcname", parmPCname)

I am using CR version 13 patch 10 in VS2013

Anyone have any ideas on the above error message?

thanks

doug

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

The place to start is the database documentation. Database Vendor Code messages are being passed through the CR engine unmodified so they do not mean anything to us.

You do mention that the report runs fine... but were? The designer?

See if simplifying will help;

Comment out all code except:

newMakingDuration.ReportDocument.Load(reportPath)

Then of course view or export or print code (that part of the code is missing in your post (e.g.; I'm not sure what you are attempting to do with the report)). E.g.; if viewing:

newMakingDuration.ReportDocument.Load(reportPath)

CrystalReportViewer1.ReportSource = <the report you loaded>

This will force the report to load and prompt for the parameters and db logon. Fill those out and see what happens.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Answers (1)

Answers (1)

0 Likes

Try formatting the parameter using this way or what ever type it is:

newMakingDuration.SetParameterValue("pcname", Convert.ToString(parmPCname));

The error means you are not formatting the value properly or the log on info is incorrect. CR is simply passing the error from the Client to you.

Don

Former Member
0 Likes

Thanks Don and Ludek for the assistance.

I was able to get past this by recreating the report from scratch and creating a stored procedure in my SQL Server 2012 db.  Before I simply was using a SQL query command in the report and I think something to do with how I created the parameter was causing the query to not run.  It works great with a stored procedure.

thanks again