Re: How to get the id of the newly inserted record?

2006-07-26 Thread Paul J DeCoursey
Hong Ji wrote: With JDBC and Derby, how to get the id of the newly inserted record? SELECT IDENTITY_VAL_LOCAL() FROM ...

Re: Statement.getGenerateKeys() doesn't work with Derby

2006-07-26 Thread Kristian Waagan
Hong Ji wrote: Hello, I am using a PerparedStatement to insert a record. After the record is inserted (after statement.executeUpdate()), I call aStatement.getGeneratedKeys() to retrieve the generated id of the new record, but it returns a null ResultSet. Is getGeneratedKeys() supposed to

How to monitor progress during data import

2006-07-26 Thread Fantry, John
I am using Derby to import a large text file into a table. I would like to be able to display a progress dialog to the user while the import is processing. In order to provide a useful progress bar I need to be able to calculate the % complete of the import procedure. Does anyone know if

Re: How to monitor progress during data import

2006-07-26 Thread Andreas Korneliussen
Fantry, John wrote: I am using Derby to import a large text file into a table. I would like to be able to display a progress dialog to the user while the import is processing. In order to provide a useful progress bar I need to be able to calculate the % complete of the import procedure.

Re: How to monitor progress during data import

2006-07-26 Thread Mike Matrigali
Andreas Korneliussen wrote: Fantry, John wrote: I am using Derby to import a large text file into a table. I would like to be able to display a progress dialog to the user while the import is processing. In order to provide a useful progress bar I need to be able to calculate the %

Returning DatabaseMetaData for Derby Synonyms

2006-07-26 Thread Trent Rosenbaum
Hi there,A project I am working on is using Derby database 10.1.3.1 and contains a number of synonyms and regular tables.There is a certain situation that requries us to determine if a name represents a real table or synonym. The following code is used:... // Filter the metadata to only

RE: How to monitor progress during data import

2006-07-26 Thread Fantry, John
I am importing the data using the built in system procedure SYSCS_UTIL.SYSCS_IMPORT_TABLE. This procedure takes the name of the file to import as an argument. Derby opens the file using whatever mechanism it wants. I don't have an opportunity to wrap the stream myself. -Original

obtaining catalog info on primary and foreign keys

2006-07-26 Thread Fabio Porto
Hello all, Im building an application that accesses Derby catalog to build a dynamic interface. I need to obtain primary key and foreign key attributes, does anyone know where and how those columns get stored in the catalog? Thanks a lot, Fabio.

Re: obtaining catalog info on primary and foreign keys

2006-07-26 Thread Jean-Francois Dignard
Primary Keys are stored in the SYS.SYSKEYS table. Foreign keys are stored in the SYS.SYSFOREIGNKEYS table. To understand and use the data in those tables, you will need to make a join with CONSTRAINTID on the SYS.SYSCONSTRAINTS table CONSTRAINTID. To know on which tables the constraints are

Re: Returning DatabaseMetaData for Derby Synonyms

2006-07-26 Thread Satheesh Bandaram
Trent Rosenbaum wrote: ... // Filter the metadata to only return results relating to Synonyms. String[] types = {SYNONYM}; // Return the current metadata and use the table name to narrow the table patten. DatabaseMetaData metaData = DatabaseManager.getConnection().getMetaData();