MySQL Forums
Forum List  »  Analytics, Reporting, BI

Using Crystal to update MySQL database
Posted by: rasinc rasinc
Date: April 11, 2011 01:03PM

I am trying to use Crystal to update a MySQL database with some information. Basically, I am displaying payment info on the report. I want to run an on-demand subreport when the user has verified payment information. So the user will click the subreport on screen.

I am having a problem with the sytax of the command in Crystal XI for the subreport. I keep getting syntax messages. So I am wondering if MySQL will accept multiple command lines in a Crystal Command object. I don't see why not because it does support stored procedures.

I am trying to use the following two statments and wondeing if someone can correct my syntax.

Insert Into DatabaseName.rasvenpmt
({?VenTrDtID}, CURDATE());

SELECT `rasvenpmt1`.`VTrDtID`, `rasvenpmt1`.`VdtDate`
FROM `DatabaseName`.`rasvenpmt` `rasvenpmt1`
WHERE `rasvenpmt1`.`VTrDtID`={?VenTrDtID}

Normally Crystal wants single quotes around the table and field names but it gave several errors in the Insert command portion until I removed them. Now it is complaining about the Select statement. But the select statement works fine if it is the only thing in the command.

Current error message is

"Failed to retrieve data from the database. Details: 4200[MySQL][ODBC 3.51 Driver] error in your SQL syntax...right syntax to use near ':

SELECT `rasvenpmt1`.`VTrDtID`, `rasvenpmt1`.`VdtDate`
FROM `DatabaseName` at line 4 [Database Vendor Code: 1064]

I hope someone can help. TIA, rasinc

Options: ReplyQuote

Written By
Using Crystal to update MySQL database
April 11, 2011 01:03PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.