What are some of the conditions that can cause the “Cannot open SQL Server” error message?
Download PDF version of this faq: CannotOpenSqlServer.pdf
This error message is usually caused when the application tries to read the data from the database without first providing database logon information. Another possibility is that database logon information has been provided, but the information is invalid or has changed.
Issue No 1
The Microsoft SQL Server native database driver that Seagate/Crystal Decisions ships with Crystal Reports 18.104.22.168 is defective. Parallel Crystal v2.3, v2.4, v2.5, v2.6 and v2.7 are based on Crystal 7 and have this same driver as part of their installation.
If a report uses a native connection (P2ssql.dll) to a Microsoft SQL Server stored procedure, when a Date Time type parameter is passed to the stored procedure in the Seagate Crystal Reports Designer, the report runs returning correct data.
However, when the report is called at runtime with the same parameter value, no data is returned. The report does not return any error messages and appears as a report with no data in it.
To resolve this issue:
Note: According to the Crystal Decisions web site, there is a later Microsoft SQL Server direct database driver. Please do not install or use the later driver with Dynalivery Parallel Crystal v2.3, v2.4, v2.5, v2.6 and v2.7.
Also make sure you are using p2s*. dlls which are the newer 32bit DLLs rather than pds*.dlls which are 16bit DLLs.p2s*.dlls can be used directly(not getting it from table type)with LogOnServer which takes a DLL name and a LogOnInfo structure.
Issue No 2
// JAVA log into the SQL Server through the native SQL driver
/* Note: Use the appropriate dll in LogOnServer() API for the DBMS used */
boolean logOnStatus = engine.LogOnServer ( "P2SSQL.DLL", logOnInfo );
' Log on to the SQL Server through the native SQL driver
Another possible reason is that the client to your DBMS is not installed on the report server. To fix this simply run the install shield for your DBMS and install the “client only” on the report server.
Issue No 3
The log on portion of your code should look like the log on portion of the sample code available from this link: http://www.dynalivery.com/customersupport/faq/databaselogon.html
Issue No 4 (Access of Sybase 11 or successors database with old database driver)
Parallel Crystal v2.4, 2.5, 2.6, and v2.7 are based on Crystal Reports 7. The latest Sybase driver that was available at the time CR v7 was released (1999) is the Sybase version 10 driver. Access of Sybase 11 or successors with the old (version 10) driver is not stable and has some known problems.
The Sybase 32bit native driver provided by Crystal Decisions is called “p2ssyb10.dll”
They Sybase System 10 ODBC driver provided by Crystal Decisions is called “crsyb13.dll”
There is a subtle incompatibility between the Sybase 10 database driver p2ssyb10.dll, and the Sybase 12 DBMS that may "freeze" the first data source specified in a report template. Sybase 11+ users may not be able to use one report template for different data sources.
If the database logon/logoff parameters are different at run time then it will be necessary to consider alternatives. Dynalivery recommends that customers in this situation use our preferred method for data acquisition, Data Object Reporting (DOR).
In the event that it is not possible or desirable to use DOR it will be necessary to create a separate template for each data source.
ODBC may be a third alternative but we highly recommend thoroughly testing this solution first. Lastly you may want to consider upgrading to Parallel Crystal v3.1 (Crystal Reports 8.5) or successors.
PCRE errors that may be associated with this problem are:
Conditions under which this condition may arise:
Issue No 5
Issue No 6
There is additional information on these error messages in the Crystal Reports 6 and 7 Developer's Help Systems and Technical Reference Manuals.
|BACK TO TOP
BACK TO START