how to read the values from the result then?
i tried this:
-----------------------------------------------------
private DataContext createContext() {
Configuration.bootstrapSharedConfiguration(this.getClass());
return
Configuration.getSharedConfiguration().getDomain().createDataContext();
}
-----------------------------------------------------
private DataContext ctxt;
this.ctxt = createContext();
Expression qual =
ExpressionFactory.likeIgnoreCaseExp("galleryName",likePattern);
SelectQuery query = new SelectQuery(<yourBusinessClass>, qual);
yourBusinessClass a = null;
try
{
ResultIterator result = ctxt.performIteratedQuery(query);
System.out.println(" done! " );
a = (yourBusinessClass)result;
}
catch(Exception e)
{
System.out.println("error : " + e);
}
System.out.println("and : " + a.getgalleryName());
-----------------------------------------------------
but it didnt work.
thanks in advance!
Sako
----- Original Message -----
From: <jsaa..eb.de>
To: <cayenne-use..bjectstyle.org>
Sent: Thursday, June 24, 2004 2:11 PM
Subject: Re: read Row
> Expression qual =
ExpressionFactory.likeIgnoreCaseExp("galleryName",likePattern);
> SelectQuery query = new SelectQuery(<yourBusinessClass>, qual);
> ResultIterator result = myContext.performIteratedQuery(query);
>
> // where query is a DataContext instance
>
>
> "Sako!" <webobject..tcc.datos.de> schrieb am 24.06.04 12:41:34:
> >
> > Hello Cayenne users,
> > i try to get a Row from DB/Table.
> > i checked the example and tried to fit it to my table.
> > read String
> > Expression qual = ExpressionFactory.likeIgnoreCaseExp("galleryName",
> > likePattern);
> >
> > i look for an int
> >
> > Expression qual = ExpressionFactory.likeIgnoreCaseExp("Nr", nr); // nr
is an
> > int.
> >
> > i checked the ExpressionFactory API, but didnt really find a good
> > explination.
> > any can help here please?
> >
> > thank you!
> > Sako
>
> ____________________________________________________
> Aufnehmen, abschicken, nah sein - So einfach ist
> WEB.DE Video-Mail: http://freemail.web.de/?mc=021200
>
>
This archive was generated by hypermail 2.0.0 : Thu Jun 24 2004 - 09:01:11 EDT