RE: Problem with default date values

2007-08-09 Thread Nathan Voxland
I checked, and I am running 10.2.2.0. The issue you list talks about setting the default value for a table with rows, but my table doesn't have any. The full list of SQL ran against the table is: CREATE TABLE defaultValueTest ( id int, intA int, textA varchar(5),

Embedded or Network Framework?

2007-08-09 Thread Teja Palla
I am new to Derby and unable to figure out which framework suits my situation: Embedded or NetworkServer framework. I have a java application (which is a media server, sort of like flash media server, but written all in java), for which I wish to use derby as its database. The app will have say

Re: Embedded or Network Framework?

2007-08-09 Thread Manjula Kutty
Hi Teja, Based on your description , I think Network Server will be the best solution. I have a java/jsp application which uses Derby and then I'm using a webserver to get the tables/ and rows and I use the networkserver for that application and it works like a charm. Hope this helps you

Re: Embedded or Network Framework?

2007-08-09 Thread Teja
Thanks for your reply... In your case, I see only a web server connecting to the database, even if there are multiple web applications, they still go through the web server right, so there is only one JVM and embedded database will suffice??? But in my case, I have a web server and another

Re: Embedded or Network Framework?

2007-08-09 Thread John Embretsen
Teja wrote: Can someone confirm this: In my java app, on startup or so, I 'load' the embedded derby driver, so the database is ready to be used by the java app. But I also launch the web server (separate thread) through the same app, so the web server is still running in the same JVM(?).

Re: Problem with default date values

2007-08-09 Thread Bryan Pendleton
Does setting the default value for the other columns kick in that bug? No, I didn't think so. DERBY-2371 specifically involved a problem when there were a non-zero number of non-null values in the table at the time of the ALTER TABLE command. Also, I tried your complete set of commands against

RE: Problem with default date values

2007-08-09 Thread Nathan Voxland
I tried the 10.3.1.4 release, and my test case if failing before I get to the other error. It's failing on this call: tableRS = conn.getMetaData().getTables(getCatalogName(), getSchemaName(), null, new String[]{TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, SYNONYM}); with this stack trace:

RE: Problem with default date values

2007-08-09 Thread Nathan Voxland
The stacktrace I am getting in my app is: ERROR 22005: An attempt was made to get a data value of type 'long' from a data value of type 'DATE'. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at

Re: Problem with default date values

2007-08-09 Thread Bryan Pendleton
I tried the 10.3.1.4 release, and my test case if failing before I get to the other error. It's failing on this call: tableRS = conn.getMetaData().getTables(getCatalogName(), getSchemaName(), null, new String[]{TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, SYNONYM}); with this stack trace:

Using Functions to Return ResultSets

2007-08-09 Thread baiguai
I have done a search on this, but didn't see anything - if I have overlooked a post, my apologies. I am trying to create a reusable function that would allow me to send in a derby query, and get a resultset back. This way I can cut down on a ton of redundant code, but when I try to send the

Re: Using Functions to Return ResultSets

2007-08-09 Thread Bryan Pendleton
I am trying to create a reusable function that would allow me to send in a derby query, and get a resultset back. http://wiki.apache.org/db-derby/DerbySQLroutines Look for the section titled Returning java.sql.ResultSets from Java procedures thanks, bryan

Binary Stream Cleanup

2007-08-09 Thread Raymond Kroeker
Hi All, Is there something special/specific I have to do after writing a large binary stream to my database in order to reclaim memory resources? My use-case is: 1. Create a new row containing a name, content and content size. (500MB file) 2. Commit via the connection. (autocommit is

Re: Embedded or Network Framework?

2007-08-09 Thread Teja
Ah, you nailed it for me.. so the documentation changed the definition of JVM a bit Thanks a lot. John H. Embretsen-3 wrote: Teja wrote: Thanks Manjula, John and Bryan; Not very clear yet, but in my situation of a web server( strictly, application server) and a java app (actually a

check if DB exists already?

2007-08-09 Thread Teja
How do I check if the database exists already? I know create=true in the connection url creates if db doesn't exist and throws a SQLWarning if exists already, but is there a way to know for sure that a database exists already before connecting? -- View this message in context:

Re: Embedded or Network Framework?

2007-08-09 Thread John H. Embretsen
Teja wrote: Ah, you nailed it for me.. so the documentation changed the definition of JVM a bit Thanks a lot. Well, I wouldn't go as far as to say that, but as long as you get the picture, that's great! Keep on coding :) -- John

Re: check if DB exists already?

2007-08-09 Thread dmclean62
A Derby database is a directory containing a fairly distinctive set of files. You could use file system operations to see if a directory by that name exists and then check to see if it has the right files. Donald -- Original message -- From: Teja [EMAIL

Re: check if DB exists already?

2007-08-09 Thread Teja
I have to say that really sucks.. They could've easily comeup with a system function that would check if a db exists or not instead of the user doing directory and file checks. But then, it is free, so I cann't complain much.. dmclean62 wrote: A Derby database is a directory containing a

Re: check if DB exists already?

2007-08-09 Thread Daniel John Debrunner
Teja wrote: How do I check if the database exists already? I know create=true in the connection url creates if db doesn't exist and throws a SQLWarning if exists already, but is there a way to know for sure that a database exists already before connecting? Why not just attempt a connection?

Re: check if DB exists already?

2007-08-09 Thread Teja
If the database doesn't exist, I need to initalize it, create some tables and stuff... What should I do instead? Daniel John Debrunner-2 wrote: Teja wrote: How do I check if the database exists already? I know create=true in the connection url creates if db doesn't exist and throws a