Re: Embedded Derby

2007-10-03 Thread Mikael
Are you specifing user names anywhere ? If you don't have a user name all tables will be created in the APP schema, if you specify a user name that name will be used as schema name. Could this be the problem ? - Original Message - From: Daniel Noz [EMAIL PROTECTED] To:

Re: Derby Eclipse Plug-in versus JavaDB or Apache Derby

2007-10-03 Thread danga
Aaron, Thanks for your reply I believe this is exactly what I need but help out here how can I get this working. I am not an expert in java. I am using Eclipse for a long time but not for programming purposes. I assume I have to get the sources of Derby and incorporate the two jars. regards,

Re: Embedded Derby

2007-10-03 Thread Dyre . Tjeldvoll
Daniel Noz [EMAIL PROTECTED] writes: Hello derby-users, I develop a richt client application with netbeans using derby-db and toplink as JPA implementation. If i use the embedded driver (see property name=toplink.jdbc.driver value=org.apache.derby.jdbc.EmbeddedDriver/) it works great to

checking if table exists

2007-10-03 Thread Wolf Bublitz
Hi, I'm new to Derby DB and I want to know how it is possible to check if a table exits. Via the command line tool I can get a list by typing SHOW TALBES but in Netbeans' db-editor this does not work. I get the following error: SHOW TABLES Error code 3, SQL state 42X01:

Re: checking if table exists

2007-10-03 Thread Mikael
You can only use SQL queryes there, no special command line tools, you could do something like this in JDBC: DatabaseMetaData metadata = null; metadata = connection.getMetaData(); String[] names = { TABLE}; ResultSet tableNames = metadata.getTables( null, null, null, names);

Re: checking if table exists

2007-10-03 Thread Wolf Bublitz
Hi, I tried to implement your code and it compiles without errors. String[] names = { TABLE }; ResultSet result; DatabaseMetaData metadata = null; try { metadata = dbConnection.getMetaData(); result = metadata.getTables(null, null, null,

Re: checking if table exists

2007-10-03 Thread Stephen Caine
Wolf, We include a Derby Manager with our Qilan v3.1 download. It is web based and will allow most schema operations (including viewing tables) as well as data editing. Qilan is shareware and can be downloaded from: http://cgs.qilan.com:8080/qilan/Qilanv3Download Good luck, Stephen

Re: checking if table exists

2007-10-03 Thread Bryan Pendleton
while((result.next()) (tableExists = false)) { Is this possibly a typo? Make sure it says: while((result.next()) (tableExists == false)) { You want to do a logical and, not a bitwise and; also you want to do a comparison, not an assignment. thanks, bryan

Re: checking if table exists

2007-10-03 Thread Wolf Bublitz
That`s the way it should be, but does not work either. String[] names = { TABLE }; ResultSet result = null; DatabaseMetaData metadata = null; try { metadata = dbConnection.getMetaData(); result = metadata.getTables(null, null, null,

Re: Derby Eclipse Plug-in versus JavaDB or Apache Derby

2007-10-03 Thread Aaron J Tarter
You would need to checkout the source for the UI plugin and build it yourself until the patch is applied (I'm not a committer so I can't apply it myself). I think the easiest way to build is to checkout the

Re: checking if table exists

2007-10-03 Thread John Embretsen
Wolf Bublitz wrote: That`s the way it should be, but does not work either. Make sure you are accessing the correct database and the correct schema. The location of the database you are connecting to may depend on a) whether you are running embedded or client/server b) the value of the

Re: checking if table exists

2007-10-03 Thread Wolf Bublitz
The database connection is working since adding and dropping tables workes perfectly. Concerning the schema, I am not sure. In netbeans' db manager I decided for App as schema although I do not know what it means. May some could it explain to me. Thanks Wolf Am 03.10.2007 um 16:21 schrieb

Re: checking if table exists

2007-10-03 Thread John Embretsen
Wolf Bublitz wrote: The database connection is working since adding and dropping tables workes perfectly. Concerning the schema, I am not sure. In netbeans' db manager I decided for App as schema although I do not know what it means. May some could it explain to me. I'll try, hoping it's not

Database shutdown not releasing file locks

2007-10-03 Thread EdS
I run into an issue where i dynamically create databases to cache data. At some point when I no longer need the cache, I perform a shutdown and delete the directory where the database resides. Unfortunately there's still open file references to one of the c*.dat files that prevents me from

Re: Database shutdown not releasing file locks

2007-10-03 Thread Manjula Kutty
I tried the same scenario you mentioned and I'm able to delete the database without any problem? Are you deleting manually or through any pgm? -Manjula On 10/3/07, EdS [EMAIL PROTECTED] wrote: I run into an issue where i dynamically create databases to cache data. At some point when I no

Re: Database shutdown not releasing file locks

2007-10-03 Thread EdS
Running embedded mode within a Tomcat webapp. I have some Java code that programmatically does the shutdown and directory deletion. I get the expected SQLException on the shutdown. Attempting to delete the directories fails both within the webapp and from external shell command. In a

Re: Embedded Derby

2007-10-03 Thread David Van Couvering
The other problem that can happen is that the tables are created in a different schema than the one that is used when you connect with NetBeans. Notice that your connection in NB is labeled 'bb on APP'. That means it's using the default schema, APP. It's possible that your tables were created

Re: checking if table exists

2007-10-03 Thread Craig L Russell
On Oct 3, 2007, at 6:44 AM, Bryan Pendleton wrote: while((result.next()) (tableExists = false)) { Is this possibly a typo? Make sure it says: while((result.next()) (tableExists == false)) { You want to do a logical and, not a bitwise and; The difference between

Re: checking if table exists

2007-10-03 Thread Bryan Pendleton
The difference between boolean1 boolean2 is not bitwise versus logical; it's between unconditional versus conditional operation. Thanks Craig! There's always more to learn ... bryan