|
From: Carlo D. (JIRA) <nh...@gm...> - 2011-04-15 12:30:19
|
[ http://216.121.112.228/browse/NH-2436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20908#action_20908 ]
Carlo DiGiacomo commented on NH-2436:
-------------------------------------
I am using 3.1 and I am also having the same issue.
> Db2400 Use of parameter marker not valid
> ----------------------------------------
>
> Key: NH-2436
> URL: http://216.121.112.228/browse/NH-2436
> Project: NHibernate
> Issue Type: Bug
> Components: DataProviders / Dialects, Linq Provider
> Affects Versions: 3.0.0.CR1
> Reporter: stephane borel
> Priority: Minor
>
> Using db2 on iSeries when running:
> var query = from client in session.Query<Client>() where (client.name.Contains("XYZ")) orderby client.id select client;
> the following statement is generated:
> select client0_.ID as id0_, client0_.NAME as name0_ from DEVENV.CLIENTS client0_ where (client0_.NAME like ('%'||?||'%')) order by client0_.ID asc
> with parameter Name:p1 - Value:XYZ
> This causes error
> [iDB2SQLErrorException (0x80004005): SQL0418 Use of parameter marker not valid.]
> The reason is that db2 cannot guess the parameter's type. The parameters should be cast to the columns parameter.
> In this would generate the following statement:
> select client0_.ID as id0_, client0_.NAME as name0_ from DEVENV.CLIENTS client0_ where (client0_.NAME like ('%'||CAST(? as VARCHAR(255))||'%')) order by client0_.ID asc
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|