|
-
Apr 3rd, 2007, 12:07 PM
#1
Thread Starter
New Member
Crystal Reports SQL query
Hello!
Could you please help me.
My task is to get from Crystal Report SQL select query and then generate ADODB recordset based on this query.
For MS Access all works well.
I used SQLQueryString method and then put this sql query when open recordset. The string was for example as:
" SELECT `JCostRptData`.`ItmUID`, `JCostRptData`.`ItmName`
FROM `JCostRptData` `JCostRptData`"
where JCostRptData is the table and ItmUID, ItmName are the fields of this table.
But when I tried to put this SQL query for MSSQL, application crashed because MSSQL cannot parse this query.
Maybe somebody of you know how to get from crystal report correct SQL select query(Analog of Database->Show SQL Query in CR) for any database type?
Thanks a lot.
-
Apr 3rd, 2007, 04:29 PM
#2
Re: Crystal Reports SQL query
Welcome to VBForums 
The ` marks aren't needed, and neither is the table alias. Try this:
" SELECT JCostRptData.ItmUID, JCostRptData.ItmName
FROM JCostRptData "
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|