cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Gilbert <>
Subject Re: [SPAM Warning - SPF Alert] - Re: Named Queries with parameters on SQLServer - Sender is forged (SPF Fail)
Date Fri, 20 Jul 2007 19:14:52 GMT
Sounds great!

Thanks a lot for sharing this.


On 20/07/07 20:47, "Andrus Adamchik" <> wrote:

> On Jul 20, 2007, at 2:25 PM, Thomas Gilbert wrote:
>> Dear All,
>> Do you have any hints about NamedQueries with parameters on
>> SQLServer ?
>> I created a named query "Q1", let's say "select * from T where x = ?".
>> How can I pass the parameter value to this query as it can only be
>> done via key/value pairs, and on SQLServer, parameters are not
>> name... ?
>> Thanks a lot
>> Thomas
> Hi Thomas,
> I assume your named query is mapped in the modeler as raw SQL?? If
> that's the case, named parameters are mapped using Cayenne format,
> that has nothing to do with syntax of the PreparedStatement (that it
> will will eventually generate). So your query SQL would look like this:
> "select * from T where x = $myParameter"
> so later you can use "myParameter" as a key name. You can read more
> here:
> Again - $ variables is a Cayenne artifact, that is not related to
> JDBC or the underlying DB.
> Andrus

CONFIDENTIALITY: This e-mail and any files transmitted with it are confidential and intended
solely for the use of the recipient(s) only. Any review, retransmission, dissemination or
other use of, or taking any action in reliance upon this information by persons or entities
other than the intended recipient(s) is prohibited. If you have received this e-mail in error
please notify the sender immediately and destroy the material whether stored on a computer
or otherwise.

DISCLAIMER: Any views or opinions presented within this e-mail are solely those of the author
and do not necessarily represent those of SIDE International S.A. - EastNets Group, unless
otherwise specifically stated.

View raw message