> Is there a big difference between 0.9.5 and 1.0?
Yes and no ;-)
Big difference between 0.9.5 ans 1.0 in repository.dtd
and OJB.properties .
In the PB-api we add new methods and rename
some methods.
Best is you compare the repository_junit.xml of both
versions to get a clue (field id's were removed, ...).

Sequence manager and connection pool now could be
declared per jdbc-connction-descriptor in the repository
file (see repository and sequence manager docs).

regards,
Armin


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 20, 2003 9:46 AM
Subject: RE: how to send a real SQL query to OJB


I'm thinking about upgrade.

The problem is that I don't know what will be wrong in my actual code
for OJB 1.0.
Is there a big difference between 0.9.5 and 1.0?

Thanks
Sylvain

-----Message d'origine-----
De: Armin Waibel [mailto:[EMAIL PROTECTED]
Date: jeudi, 20. mars 2003 09:38
À: OJB Users List
Objet: Re: how to send a real SQL query to OJB


Hi Sylvain,

> But it doesn't work for me.
> I'm using OJB 0.9.5.
It couldn't work for you, because
this services don't exist in 0.9.5.
Recommended upgrade to latest
version.
But it's also possible to grap a connection
and do your work 'by hand' (AFAIK).

regards,
Armin


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 20, 2003 8:58 AM
Subject: RE: how to send a real SQL query to OJB


Hi Armin,

I have seen the FAQ. Thanks.

But it doesn't work for me.

My SQL query is "select workstationName from Workstation".
>From my database query analyzer, this query retrieves 36 rows.

In OJB I try:
----code----
String sql = "select workstationName from Workstation";

Query query = QueryFactory.newQuery(Workstation.class, sql);

try {
broker.beginTransaction();
Collection col = broker.getCollectionByQuery(query);

int size = col.size();
System.out.println(size);

broker.commitTransaction();
} catch (Throwable t) {
broker.abortTransaction();
t.printStackTrace();
}
----code----

The problem is that the size of the collection is 0!
OJB doesn't retrieve anything!

But if I try the query "select * from Workstation", it works!!

Have you an idea what's the problem?

I'm using OJB 0.9.5.


Thanks
Sylvain


-----Message d'origine-----
De: Armin Waibel [mailto:[EMAIL PROTECTED]
Date: mercredi, 19. mars 2003 16:12
À: OJB Users List
Objet: Re: how to send a real SQL query to OJB


Hi Sylvain,

see FAQ
http://db.apache.org/ojb/faq.html

topic "Is it possible to perform my own sql-queries in OJB?"
+ "Can I directly obtain a java.sql.Connection within OJB?"

regards,
Armin

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 4:05 PM
Subject: how to send a real SQL query to OJB


Hello,

I have a String variable which contains a real SQL query like this:
"SELECT distinct(workstationName) FROM Workstation w, WntWorkstation t,
Package p, Package_Workstation r WHERE (w.workstationName like '%' or
w.workstationName is NULL) order by w.workstationName"

How can I send this query (as written above) to OJB?

Thanks
Sylvain

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to