Data Retrieval Failure - Syntax Error
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
Hmmm, that's a good point. We did not ask the PR company if it was possible to connect directly to their DB, we just assumed that we could (the possibility that we couldn't never crossed my mind). We will look into that. We have also tried to connect via Excel (import external data/new database query) and we get a similar syntax error. Both Crystal and Excel seem to be recognizing the database in that they bring up the list of available tables and fields and allow us to select them but it is at the point where they try to return results that we get the error.
The tables themselves do not have spaces in the names, they are either one-word names or use "_" for multi-word names. The fields are the same. It is the database name that has the spaces. And I was wrong, "Aid" is actually the third word in the DB name. "xxxx xxxxxxxxx Aid xxxxxx".
I just tried to query on different tables thinking that maybe some of them could be accessed and some couldn't but I'm still getting the same error message. You may be onto something with respect to not having permission to connect to the DB - I'll contact Paymate and find out.
Thanks!
Similar Messages
-
How do I fix this popup error ?
It doesn't look to me like it has anything to do with PDF forms, or any Adobe product, so you're unlikely to get an answer here in the Adobe forums.
-
Data Source 0HR_PA_0 Syntax Error in the start routine while activating
Hi All,
I have migrated the Business content for the data source 0HR_PA_0
While activating the transformation-2 there is errors like:
Start Routine: Syntax error in routine
Rule (target: 0HDCNT_LAST, group: 01 Standard Group): Syntax error in routine
Rule (target: 0AGE_KYF, group: 01 Standard Group): Syntax error in routine
.................... etc
I need help to resolve this issue.
Thanks & Regards,
SavithaHello Jurgita,
When Data Source was migrated the codes related to COMM_STRUCTURE was missing in the start routinue.
Following codes (in bold) with regard to COMM_STRUCTURE added and then got activated
4. *--
5. COMM_STRUCTURE type tys_sc_1__rule_25,
6. l_subrc type sy-tabix,
7. l_abort type sy-tabix,
8. ls_monitor TYPE rsmonitor,
9. ls_monitor_recno TYPE rsmonitors.
10.
11. REFRESH:
12. MONITOR.
13.
14. * Runtime attributs
15. SOURCE_SYSTEM = p_r_request->get_logsys( ).
16. move-corresponding SOURCE_FIELDS to COMM_STRUCTURE.
17.
18. * Migrated update rule call
19. Perform routine_0011
20. using
21. COMM_STRUCTURE
22. CHANGING
Regards,
Savitha
Edited by: Savitha Ravi on Jun 19, 2009 6:34 AM -
The codes are..
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
conn.ConnectionString = connstring
If conn.State = ConnectionState.Closed Then
conn.Open()
Else
MsgBox("Close")
End If
If (String.IsNullOrWhiteSpace(TextBox1.Text)) Then
MessageBox.Show("PLEASE FILL IN ALL THE BOXES")
ElseIf (String.IsNullOrWhiteSpace(TextBox2.Text)) Then
MessageBox.Show("PLEASE FILL IN ALL THE BOXES")
ElseIf (String.IsNullOrWhiteSpace(RichTextBox1.Text)) Then
MessageBox.Show("PLEASE FILL IN ALL THE BOXES")
End If
Try
Dim SqlQuery As String = "INSERT INTO Research (Title,Abstract,Proponents,Ryear) VALUES ('" & TextBox1.Text & "', '" & RichTextBox1.Text & "', '"
& TextBox2.Text & "', '" & DateTimePicker1.Text & "')"
Dim SqlCommand As New OleDbCommand
With SqlCommand
.CommandText = SqlQuery
.Connection = conn
.ExecuteNonQuery()
End With
MsgBox("One record Succesfully Added")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Me.Close()
main.Show()
End Sub
The situation is, I cannot add data if it is copied from the text from the ms word and paste it to the RichTextbox in my project..I can only add if I type Manually the data the richtextbox..If I copy paste it..this error comes out.
Please help me to solve this problem..i attached the image of the errorWindows Form forums are here.
http://social.msdn.microsoft.com/Forums/windows/en-US/home?category=windowsforms
or ASP.Net forums are over here.
http://forums.asp.net/
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
LSMW - inforecord / material master - syntax error when converting data
Hi all,
I used LSMW for classification uploads (material master, vendor master) so far - it was easy :-). But..I tried to create/update inforecords by object 0060, method 0000, program RM06IBI0. I declared source structure, source fields, field mappings and conversion rules (in my batch input I use only fields which we defined as required for infrecs.), files etc. LSMW reads the data but when I try Convert data - the is syntax error in program /1CADMC/SAP_LSMW_CONV_00000018 and dump with message "For type "C", a maximum length specification of 65535 is allowed." When I tried to create material master (object 0020, method 0000), Convert data command worked the same.
Any help would be appreciated. (? sample from your batch input file which works well to compare)
TomasHi Tomas,
Please do me a favor. In the initial screen of LSMW, there is a pushbutton for 'Personal Menu'. Once you press that it will pop-up a screen with a bunch of checkboxes. Select the checkbox for 'Display Conversion Program' and press enter. Now you should see the 'Display Conversion Program' option in your initial screen. Select that and go into the conversion program. Put a break-point in the conversion program on the statement 'perform execute_data_conversion.'.
Debug it and find out exactly where the error is occuring. Perhaps that will help you figure out what the error is, if not, let the forum know where you hit the error. Even looking at the dump, you should get more information.
Srinivas -
Failed to retrieve data from the database Error
I had some reports setup in Crystal XI based on a Sql server but recently we had an upgrade, the database has been moved to IBM Informix.
There is a certain table that seems to be causing the problem.
The error:
"Failed to retrieve data from the database
Details: 42000:[informix][informix ODBC Driver][informix]A syntax error has occured .[Database Vendor Code:-201]".
I run the same query in MS Access and it seems to run fine.
I even tried to do a simple dump of the table onto Crystal but no luck.
Any help is appreciated.
Thanks!
Achett13Hi,
It seems your ODBC Driver is not compatible, try to download a driver which supports Informix through CR XI. I think you may have to download Data Direct Drivers 5.1 version to access Informix data tables through CR XI.
You can google it for Data Direct Drivers 5.1
Thanks,
Sastry -
Hi Experts,
I got one problem with my query information. when Im executing my report and drill my info in my navigation panel, Instead of a table with values the message "Result set is too large; data retrieval restricted by configuration" appears. I already applied "Note 1127156 - Safety belt: Result set is too large". I imported Support Package 13 for SAP NetWeaver 7. 0 BI Java (BIIBC13_0.SCA / BIBASES13_0.SCA / BIWEBAPP13_0.SCA) and executed the program SAP_RSADMIN_MAINTAIN (in transaction SE38), with the object and the value like Note 1127156 says... but the problem still appears....
what Should I be missing ?????? How can I fix this issue ????
Thank you very much for helping me out..... (Any help would be rewarded)
David CortéYou may ask your basis guy to increase ESM buffer (rsdb/esm/buffersize_kb). Did you check the systems memory?
Did you try to check the error dump using ST22 - Runtime error analysis?
Edited by: ashok saha on Feb 27, 2008 10:27 PM -
Syntax error while doing Convert data in LSMW
Hi experts,
I am using direct input method for uploading customer master records. After display read data step, when i click Convert data button, i get a runtime error saying that:
the data object "LEGACY_CUSTOMER_MASTER" has no component called "OLD_CUST_NO", but there is a component called "SAP_CUST_NO".
But actually we do not need OLD_CUST_NO field, so i did not include it while maintaining source fields. Someone plz help. I urgently need to resolve this.
Thanks.Hi ,
I think you have declared the filed old_cust_no in the maintain field mapping step may be in global declaration or in the mapping section of hte field. Without the use of filed OLD_CUST_NO you wont get the syntax error. Check the sysntax error in field mapping step and delete the unwanted field.Check the filed mapping section carefully based on the error.
Thanks. -
Syntax error after convert data : LSMW
Hi,
I am doing a LSMW for MM01. After the convert data step I get the following syntax error:
The following syntax error was found in program
/1CADMC/SAP_LSMW_COMV_00000168
For typr "C", a max length specification of 65535 is allowed.
Can anybody help me in figuring out where I am going wrong.
Thanks,
Nileshjust execute ur lsmw in this, there is tab button user menu next to execute button , click on that , u come across a pop screen where u have a check box in that just select generate conversion program and display conversion program. and press enter.
afterwards select the radio button generate conversion program , it will shows the program in this do systax check. u will findout the error .
do syntax check by running step generate conversion programe,
and also check source fields step , r u giving correct length or not for each field.
Thanks
null -
"Syntax error in the MDX statement " in Process chain failure??Urgent pls
Hi Experts,
could any one suggest me the procedure to rectify the below problems in process chain?
1."Syntax error in the MDX statement "
2."Error when getting data (Error when getting data (AXI))"
Rgds,
BHIn which case it'll be that Access has a different date format to MySQL, and you're trying to push the string "'25-Apr-12 10:55 PM" into Access, which it's not understanding. To get around this, you need to treat your variable as a true date/time object, rather than a formatted string.
CFQueryParams should be used on absolutely every database platform, they'll stop your website being vulnerable to SQL Injection attacks for one, which at the moment you're wide open to. Replace your query with something like this:
<cfquery name="input_comments" datasource="#DSN#" username="#DSNUSER#" password="#DSNPASS#">
INSERT INTO comments(
commenter,
comment,
datetime,
post_id
VALUES(
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.commenter#" />,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.comment#" />,
now(),
<cfqueryparam cfsqltype="cf_sql_numeric" value="#form.post_id#" /> )
</cfquery>
The QueryParams will handle the data types for you, and should pass values around more safely and with fewer issues. Assuming you just want to store the current date and time you don't even need to get ColdFusion involved, as databases have their own functions for this. I believe Access' version is simply NOW(), so I've put that in your query.
Give the above a go. -
"Syntax error or access violation" on Data Flow Task OLE DB Data Source
I am implementing expression parameter for a SQL Server connection string (like this: http://danajaatcse.wordpress.com/2010/05/20/using-an-xml-configuration-file-and-expressions-in-an-ssis-package/) and it works fine except when it reaches data flow
task - OLE DB Source task. In this task, I execute a stored procedure like this:
exec SelectFromTableA ?,?,?
The error message is this:
0xC0202009 at Data Flow Task, OLE DB Source [2]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Syntax error or access violation".
Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "OLE DB Source" failed validation and returned validation status "VS_ISBROKEN"
When I change the SQL command above with reading from table directly it works fine. I should also add that before changing connection string of the SQL data source to use expression, the SSIS package was working fine and I know that the connection string
is fine because other tasks in the package works fine!
Any idea why?Hi AL.M,
As per my understanding, I think this problem is due to the mismatching between the source and the destination tables. We can reconfigured every of components of the package to check the table schemas and configuration settings, close the BIDS/SSDT and then
open and try to see if there are errors.
Besides, to trouble shoot this issue, we can use the variable window to see the variable's value. For more details, please refer to the following blog:
http://consultingblogs.emc.com/jamiethomson/archive/2005/12/05/2462.aspx
The following blog about “SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred: Reasons and troubleshooting” is for your reference:
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2009/11/10/ssis-error-code-dts-e-oledberror-an-ole-db-error-has-occurred-reasons-and-troubleshooting.aspx
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
DB connectivi​ty toolkit: syntax error in a SELECT data from joined tables
Hello everyone
I'm trying to put in labview an SQL query on joined tables.
As example I take a DB for storing the data of 2on2 basketball games, whose tables are
matches(matchId,teamA,teamB)
teams(teamId,PlayerAname,PlayerBname,Nationality)
nationalities(NatId,natName)
To get a result table with the match number and the player names along with their nationality I use this query on MySQL (which works on the command line interface)
SELECT MatchID,
t1.PlayerAName, t1.PlayerBName, n1.natName,
t2.PlayerAName, t2.PlayerBName, n2.natName
FROM matches m
INNER JOIN teams t1 ON t1.teamID = m.teamA
INNER JOIN teams t2 ON t2.teamID = m.teamB
INNER JOIN nationalities n1 ON n1.natID = t1.nationality
INNER JOIN nationalities n2 ON n2.natID = t2.nationality
When I put it in labview, using the "select data" block, I get a syntax error as shown in the attached screenshot.
Am I mistanking something in using the JOIN statements, or the aliases?
Thanks in advance!
Solved!
Go to Solution.
Attachments:
select2dabone.vi 12 KBGiovasa wrote:
I do't like very much the chain of blocks execute query+n*(fetch element)+free object, so I try to avoid that as much that I can...
Sounds like a prime candidate for a subVI. You don't have to use it every time, but it probably would help for cases where you do want to put the SQL query directly in code.
Incidentally, if you're doing joins, you might consider using views, as that allows you to hide the details of the interactions of the tables in the DB itself.
Try to take over the world! -
Hi,
I have the subreport calling from the main report. The subreport is based on MDX query agianst the SSAS cube. some dimensions in cube has values 0 and 1.
when I try to pass '0' to the sub report as the parameter value, it gives an error "Data Retrieval failed for the report, please check the log for more details".
Actually I am using table for storing these parameter values. In the main report I am calling this table (dataset) and passing these values to subreport.
so I have given like [0],[1] and this works fine. when I give only either [0] or [1] then it is throwing an error.
Could you please advise on this.
Appreciate all and any help.
Thanks,
DivyaHi Divya,
Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
Regards,
Heidi Duan
Heidi Duan
TechNet Community Support -
Date/Time Field in Access 2000 - INSERT INTO ... syntax error
I am using Labview 6.1 Professional with the Database Connectivity Toolkit. When I execute this SQL Command "INSERT INTO PRODUCTION (Part, Passed, Date) VALUES ('Part#1', 2, '10/10/2003 10:10:10 AM')" I get a Run-Time Syntax Error. If I remove the Date Label and Date Value it works. What is the proper Format of the Date/Time Type Field in ACCESS 2000 for Labview 6.1 SQL? I have seen and tried all of the solutions already posted like MSG 1ZNAJHJ6.
Well, if it's any consolation handling dates is a pain regardless of which database you use. In any case, I created a table with the following definition:
CREATE TABLE testing
(item1 INTEGER,
item2 DATE)
I them did the following insert:
INSERT INTO testing
VALUES (1, '18/11/1953 04:20:00');
And everything worked fine. Note that in the date (my Bday, BTW) the format is DD/MM/YYYY followed by the time.
What exactly is the error you're getting? Can you post the exact text of the error message. Also, I ran my test using the examples that come with LabSQL--not the toolkit.
Mike...
Oops, just noticed something. You have a column name that is probibly a reserved word "Date". Try your insert as:
INSERT INTO PRODUCTION
VALUES
('Part#1', 2, '10/10/2003 10:10:10 AM')
If there is only those three columns and they the order the data appears is the same as the column order, you don't need the column list. If this works (and it should--I just tried it) I would only view it as a temporary patch. The column name should be changed.
This is also a good reason to not use the Access GUI to create tables. If you tried creating a table like that in SQL you would have gotten an error message. Learning to build tables in SQL code isn't hard and it adds an extra layer of error checking that the GUI apparently doesn't think is important.
If you're interested let me know and I can send you the info on a really good book on SQL...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Failed to retrieve data from the database.---- Error code:-2147482925
Hi,
I am getting random error while generating a PDF report in Crystal Report XI R2.
The error details are
com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Impossibile r
Error in File C:\WINDOWS\TEMP\{11834722-3B8E-4DFF-B7B6-B3D52DF904C1}.rpt:
Failed to retrieve data from the database.---- Error code:-2147482925 Error code
name:failed
at com.crystaldecisions.sdk.occa.report.application.PrintOutputControlle
r.export(Unknown Source)
at ps_emxCrystalReportUtil_mxJPOZsBymAAAAAEAAAAD.getReport(ps_emxCrystal
ReportUtil_mxJPOZsBymAAAAAEAAAAD.java:488)
at ps_emxCrystalReportUtil_mxJPOZsBymAAAAAEAAAAD.ps_storeReportWithoutCh
eckin(ps_emxCrystalReportUtil_mxJPOZsBymAAAAAEAAAAD.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
Please help me.
Thanks in advance
-AbhiNot enough info.
The exception just states there were problems retrieving data from your data source.
Sincerely,
Ted Ueda
Maybe you are looking for
-
Media Encoder CC specify file output location doesn't work?
Hello everybody! When i render a video from Media Encoder CC the "specify output file location" only works if i go to preferences then select the folder,then when i reboot the PC it still says it's going to that location but doesn't. Does this happen
-
WiFi loss & battery drain a software issue, not hardware
I wrote the commentary below after installing IOS 7 on a 4S and resultantly losing WiFi entirely and enduring major battery drain issues. After two trips to the Apple store and meeting with their techs at the "genius" bar, I was emphatically told tha
-
Clicking Noise from hard drive_U410
Hi, I hear regular clicking noise from the new Lenovo u410 (windows 8) hard drive. How can I fix this?
-
How to install a zen micro 6gb on windows 2000
Can anybody help, I am trying to install the micro 6gb on windows 2000 pro. The device is reconised by windows but everytime it searches for a driver it cannot find one. I have downloaded and run the latest driver install pack from creative but still
-
I Upgraded to ios8 yesterday. Since then my screen has stopped rotat