Skip to Content
0
Former Member
Nov 26, 2009 at 06:17 PM

Data Retrieval Failure - Syntax Error

185 Views

Being new to Crystal Reports, we are getting an error message when trying to connect to our SQL based payroll software. We are able to select the database and the tables and fields that we want to query so it would seem that Crystal is recognizing the database, however when adding the fields to the report and previewing the results, we get the error:

"Failed to retrieve data from the database. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'Aid'. [Database vendor code: 170]"

What does this mean??

Our payroll database name contains 4 words with spaces between them. "Aid" is the second word in the DB name. We have contacted the payroll software support group to determine if we can change the name of the payroll database and they have indicated that we cannot. Is Crystal able to retrieve from a database that has spaces in its name? If not, is there a way to refer to or designate the database as something different (i.e. a one-word name like "Payroll") for Crystal Reporting purposes such that Crystal is able to retrieve data from it?

Any help anyone can offer would be greatly appreciated.

Thank you!

Tanja & Ed