on 03-31-2010 12:24 PM
Hello there,
I am trying to transfer a string parameter in Crystal Reports in an expression like:
select mskey
from dbo.mxiv_sentries
where attrname = 'MSKEYVALUE' and
searchvalue ={?MSKEY}
For some reason this doesn't work. When I enter the parameter Z3AEM the error that is returned is:
'Invalid column name 'Z3AEM'. [Database Vendor Code: 207]
I googled this error some information about quotes and double quotes that might cause this error. My problem is that I have no control over how the string parameter is presented in the SQL which is sent to SQLserver. Transfering parameters of type numbers works fine, but there seems to be a problem with string parameters. I'm using Crystal Reports 2008.
Best regards,
Anders
Hi Andreas
This could be because of the quotation settings on your db.
As long as you are running on a test system, try to do the following.
use database_name
go
set quoted_identifier off
Then you should be able to pass a query in Crystal Report ex:
select * from mxiv_sentries where searchValue=
Please advice since this is default set to "ON" I can not verify how it will affect other aspects of the idm solution.
Another suggestion is leaving the quotation setting ON, and use
select * from mxiv_sentries where searchValue like '{?MSKEYVALUE}'
Keep in mind if your mskeyvalues contains %* etc this is not a good idea.
Best regards
Roy Tronstad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.