?
Solved

Error '20527'

Posted on 1998-11-15
1
Medium Priority
?
2,019 Views
Last Modified: 2013-12-25
Hi all,
    I'm having this problem.  When I print from my VB application to Crystal Reports, I get this error message..

"SQL Server Error '20527'"

    Any idea as to what's causing this?  Thanks!

    Puay Aun
0
Comment
Question by:palim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
toophar earned 40 total points
ID: 1497652
Essentially it means the reports engine has not been able to open the database. Here's the detailed answer courtesy of seagate:

This error message is connected to using CRPE.DLL in an application, either through PELogonServer call, PESetNthTableLogonInfo call or the Connect property of the CRYSTAL.VBX.

The error occurs only in reports that read off SQL or ODBC databases. and is usually a result of a problem connecting to the datasource, or retrieving records from the database.

Common Reasons for SQL Server Error
Logon parameters
Incorrect Logon Parameters
Ensure that the ServerName, DatabaseName and UserId and Password are all valid for the server that you are trying to logon to. Crystal Reports stores a default ServerName, DatabaseName & UserId in the report. If you leave these blank when coding, Crystal will use the values stored in the report to try to logon. NOTE: A password must also be specified..

The best example of what Crystal is expecting in these members is shown under the Database / Set Location option. The ServerName or DSN corresponds to 'Server Name', the Database Name or DSQ corresponds to 'Database', and the UserId or UID corresponds to 'UserId'. If you're connecting via ODBC, ServerName refers to the ODBC datasource name, not to the path/address of the server, or the server alias.

LogonInfo parameters are not NULL terminated
The members of the logonInfo structure need to be NULL terminated. This issue can arise when you use PE calls in Visual Basic where strings are not automatically NULL terminated. To NULL terminate strings in VB, append a CHR$(0) to the string.

Incorrect StructSize given for LogonInfo structure
One of the members of the PELogonInfo structure, is StructSize. If an incorrect value is given here, a SQL Server error may result. The correct value for the StructSize is 514.

Database driver DLLs cannot be found
If you are using any of the Crystal Reports drivers to connect, refer to the Runtime Files document for a list of the files for the driver.

Wrong database DLL being loaded
If an older version of the database DLL (PDS*.DLL) is loaded, a SQL Server error can result. Use utility programs like DSX.EXE or WPS.EXE to check the DLL being loaded into memory when running the report from the app.

Datasource not found
The ODBC datasource used to log on when creating the report is not installed on the machine that is running the report. To find out what ODBC datasource is used in a particular report, select Database / Set Location in Crystal Reports while the report is open and 'Server Name' will indicate the datasource name.

Now on the machine that gets the error, run ODBC Admin, or open the file \WINDOWS\ODBC.INI and check if a datasource with exactly the same name as the one used in the report exists as an installed ODBC datasource.

For Crystal Reports version 4.0 or higher, the Q+E drivers that ship with Crystal Reports now all connect via ODBC. The error can result if the datasource used by the Q+E driver has not been installed. The following are the datasources that those drivers connect to:

SQL Server/Sybase SQL CRSS
Oracle SQL CRORA
Netware SQL CRXQL
Gupta SQLBase CRGUP
DB2/2 SQL CRDBM
 

Interface drivers cannot be loaded
ODBC drivers do not normally connect directly to the database, but connect via some client server interface. Examples of these are DBLibrary for SQL Server, CTLibrary for Sybase and SQL*Net for Oracle. Make sure the directory where the interface driver resides is included in the path. If the server interface has not been installed or has been installed incorrectly it will result in this error.

Incorrect SQL statement
The SQL statement of a report can be modified using the SQLQuery property or the PESetSQLQuery function, and a wrong SQL statement will cause this error. When modifying a SQL statement that contains an 'ORDER BY' clause, make sure there's a line feed and a carriage return character before 'ORDER BY'. The last character in the 'FROM' clause gets truncated without these.

Missing INI file
When reporting off text files via ODBC, make sure the file QETXT.INI (or SCHEMA.INI depending on the driver) exists in the directory where the text files are located.

The error can also be a result of a problem on the server side and you can usually get a better error message by adding the following line into CRW.INI found in the Windows directory.

DebugMode=Yes

When using version 4.0.1.5 or higher, open the report in Crystal Reports and select the 'More Print Engine Error Messages' option under File / Report Options. Re-save the report.

0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question