dcsimg
Accessing database tables created by EJB's with CMP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shujat_Khan
Posted On:   Friday, July 5, 2002 12:32 AM

I have developed entity beans which user Container Managed Persistence, using the J2EE download from java.sun.com, Oracle 9i, and Cloudscape. I wish to use datamigration techniques to preserve the data. The problem I have is that they show to be existing when I query them using view table commands, such as: "SELECT * FROM tab" in Oracle9i, But when I query the actual database using: SELECT * FROM ObjectBeanTable; I get an error claiming that the database table, or object does not exists. I have tried to set the entity-beans to not-create on deploy and not-delete on undeploy, but errors are thrown back such as database does not exist.    More>>

I have developed entity beans which user Container Managed Persistence, using the J2EE download from java.sun.com, Oracle 9i, and Cloudscape.


I wish to use datamigration techniques to preserve the data.

The problem I have is that they show to be existing when I query them using view table commands, such as:

"SELECT * FROM tab"

in Oracle9i,

But when I query the actual database using:

SELECT * FROM ObjectBeanTable;

I get an error claiming that the database table, or object does not exists.

I have tried to set the entity-beans to not-create on deploy and not-delete on undeploy, but errors are thrown back such as database does not exist.

   <<Less

Re: Accessing database tables created by EJB's with CMP

Posted By:   Shujat_Khan  
Posted On:   Friday, July 5, 2002 05:45 AM

I have found the solution my self...it was nothing more than a silly over-sight!

The tables were created with the statement:

CREATE TABLE "ObjectBeanTable" ...

And so you need the quotes when referencing the object in question :

SELECT xxx from "ObjectBeanTable";

otherwise :

SELECT xxx from ObjectBeanTable;

returns errors saying that ObjectBeanTable does not exist!

Sorry,

:-(
About | Sitemap | Contact