Re: Hanging around derby.log, how to center it?

2010-03-13 Thread Bernt M. Johnsen
Hi again, FYYI: The logDevice is not the derby.log file, but the database log where the database transactions are logged wrt e.g. database recovery (which is something completely different than the textual derby.log) Gabriele Kahlout wrote (2010-03-13 12:23:37): > Hello, > > I've de

Re: Hanging around derby.log, how to center it?

2010-03-13 Thread Bernt M. Johnsen
Hi, Check out the following properties: derby.system.home (http://db.apache.org/derby/docs/10.5/ref/rrefproper32066.html) and derby.stream.error.file (http://db.apache.org/derby/docs/10.5/ref/rrefproper18151.html) Gabriele Kahlout wrote (2010-03-13 12:23:37): > Hello, > > I've d

Re: how to set the timezone of CURRENT_TIMESTAMP to GMT?

2010-02-08 Thread Bernt M. Johnsen
Den 02/08/2010 10:40 AM, skrev Erin Drummond: > Hi, > > I have a table in a database that looks like this: CREATE TABLE > Data(RowID CHAR(16) FOR BIT DATA PRIMARY KEY,Value LONG VARCHAR NOT > NULL,LastUpdated TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP) The proper solution would be to use the da

Re: Streaming Results

2010-01-14 Thread Bernt M. Johnsen
Hi again, Stian Brattland wrote (2010-01-14 14:42:47): > Hi, > > Thank you for your answer Knut Anders. I do understand from what you are > saying that the Derby Driver > never will (to user the words of Brett) "materialize the entire > ResultSet on the client-side before returnin

Re: Streaming Results

2010-01-14 Thread Bernt M. Johnsen
gt; I just wanted to make sure the distinction in the question was > clear. What you call "ResultSet streaming" is as far is I know the normal behaviour of most JDBC drivers. > > Brett > > > On Thu, Jan 14, 2010 at 7:33 PM, Bernt M. Johnsen > wrote:

Re: Streaming Results

2010-01-14 Thread Bernt M. Johnsen
> > My intention with the question was not really to point out that a the > driver needs to retrive > results in the most ineffective manner as possible. > > Bernt M. Johnsen skrev: >> Hi, >> >> Some general remarks (don't remember the exact details of w

Re: Streaming Results

2010-01-14 Thread Bernt M. Johnsen
Hi, Some general remarks (don't remember the exact details of what Derby actually does with setFetchSize). Stian Brattland wrote (2010-01-14 08:43:32): > Hi, > > I've got a question regarding results streaming. The J/Connector for > MySQL supports results streaming, which means > t

Re: Start server within java-application???

2009-11-04 Thread Bernt M. Johnsen
Hardie82 wrote (2009-11-04 00:32:58): > > Hallo, > > I want to start derby in servermode within a java-application. Is this > possible? I didn't find a thing in the documentation but start the server > via console-statements. Juse the NetworkServerControl API: http://db.apache.org/

Re: ij run and utf8 file

2009-10-29 Thread Bernt M. Johnsen
RAPPAZ Francois wrote (2009-10-28 15:40:37): > I have a file with sql commands: The file is encoded in utf8. I have put > "derby.ui.codeset=utf8" in my derby.properties file in the derby system > directory. > When I load ij with > U:\docs\jprog\derby>java -jar %DERBY_HOME%/lib/derb

Re: time format (or: the curse of dst)

2009-10-24 Thread Bernt M. Johnsen
Fabio wrote (2009-10-24 11:12:48): > Hello, > > I'm using Apache Derby to store hourly values of electricity > consumption. The values are used in an electricity market simulation > implemented in Java. > > Now because of DST, hourly values mean that (for central Europe): > - one d

Re: Derby in-memory back end - where to go next?

2009-09-07 Thread Bernt M. Johnsen
Kristian Waagan wrote (2009-09-07 11:26:13): > Hello, > > In Derby 10.5 an in-memory back end, or storage engine, was included. It > stores all the data in main memory, with the exception of derby.log. If > this is news to you, and you want a quick intro to it, see [1] and [2]. > >

DERBY-PROPERTIES in /*..*/?

2009-08-05 Thread Bernt M. Johnsen
Since Derby has implemented /*...*/ comments (at last), is it possible to write /*DERBY-PROPERTIES..*/ instead of --DERBY-PROPERTIES... ? -- Bernt Marius Johnsen, Staff Engineer Database Technology Group, Sun Microsystems, Trondheim, Norway signature.asc Description: Digital signature

Re: DATE Function is not working properly

2009-06-10 Thread Bernt M. Johnsen
AliasTech wrote (2009-06-10 05:12:25): > > Hi there, > > I just started on Derby. The date funtion does not seem to be functioning > correctly. For example, > > ij> select col1, date('09/30/2009') from table1; > COL1 |2 > -- > 9 |2009-09-30 > > as

Re: "create table if not exists" ?

2009-03-17 Thread Bernt M. Johnsen
E.g. like this (I hope the SQLState is correct): try { stmt.executeUpdate("create table t (i integer)"); } catch (SQLException e) { if (!e.getSQLState().equals("X0Y32") { throw e; } } Alternatively, use the JDBC MetaData interface to check if the table is there. Note that the

Re: Need Urgent Help: Timestamp

2009-02-11 Thread Bernt M. Johnsen
Hi, Sorry, but I have no experience with SQLTimestampConverter. Gerald Wheeler wrote (2009-02-11 06:51:34): > Brent, > Thanks very much for you response.. > Do you know which pattern I can use with a timestamp textfield in the > app and using SQLTimestampConverter the would return

Re: Need Urgent Help: Timestamp

2009-02-10 Thread Bernt M. Johnsen
Gerald Wheeler wrote (2009-02-09 10:35:09): > All, > I have a java application created w/netbeans 6.5 > I am trying to input a date time into a Derby timestamp field > using default pattern the insert statements work correctly and display > Jan 2, 1991 12:00:00 > > How does one e

Re: Derby/Oracle - single SQL query?

2009-02-05 Thread Bernt M. Johnsen
Kent Spaulding wrote (2009-02-04 12:47:15): > Thanks Bernt. > > That works in both DBs. > > For the rest of what I've discovered: > > Creating a to_date function also works. Thanks for that too, as it > looks like I'll need one for decode() as well.[1] Why would you need such a fun

Re: Derby/Oracle - single SQL query?

2009-02-04 Thread Bernt M. Johnsen
Kent Spaulding wrote (2009-02-04 10:05:30): > Hi again, > > Thanks to the list, I'm able to use the same code for inserts for both > Oracle and Derby drivers. > > Now I have a SQL question, one of my queries has where clauses > (actually, all of them).. > > This works in Derby, not

Re: timestamp and Derby/Oracle?

2009-02-03 Thread Bernt M. Johnsen
Kent Spaulding wrote (2009-02-02 15:45:37): > Thanks, I've headed down that path and it looks much more promising, if > not painful. Oracle has been a bit odd wrt time and date vaules, but if you really need a literal in the statement, you should try teh JDBC escape syntax which shou

Re: JDK 1.4 support?

2008-11-26 Thread Bernt M. Johnsen
[EMAIL PROTECTED] wrote (2008-11-26 13:30:52): > So, that means that either I should install an unsupported JDK 1.4 > from SUN or a JDK 1.4 from IBM that I can not install because of IBM > JDK licensing issues. Yes, and the Sun JDK 1.4 is still downloadable. As far as I understand,

Re: JDK 1.4 support?

2008-11-25 Thread Bernt M. Johnsen
One word of caution. While Sun's JDK 1.4 had it's "end of service life" 2008-10-08, IBM's JDK 1.4 has "End of Service" 2011-09-30 Which means that there is a supported 1.4 JDK out there. If we stop requiring 1.4 for building Derby, we can't guarantee that future versions of Derby will work for IBM

Re: varchar length

2008-11-25 Thread Bernt M. Johnsen
Kristian Waagan wrote (2008-11-25 13:36:54): > tom_ wrote: >> Hello Kristian, >> >> this is a good idea, truncating by java before writing by SQL. Yes, varchar >> removes trailing blanks, though it would help if it would cut larger values >> instead of not writing them. If you have a l

Re: ibatis & derby problem

2008-11-21 Thread Bernt M. Johnsen
Zsolt Koppany wrote (2008-11-21 09:42:51): > Kathey, > > How can you always know the type of an Object? Ibatis supports also > jdbc<-->java.util.Map mapping. How do you want to know for example if a > value is not available in the Map which java type to use to set NULL? > > ps.setN

Re: Embedded and Network Simultaneous Connections

2008-11-06 Thread Bernt M. Johnsen
It is no problem having an application with an embedded Derby and starting the Derby network server so that network clients may connect to the same database: You may e.g start your embedded app like this: java -Dderby.drda.startNetworkServer=true -Dderby.drda.host=ahost -Dderby.drda.port=1234

Re: Date 2042-10-12 problem using Brasilia time zone

2008-11-04 Thread Bernt M. Johnsen
I have found that this is not related to Brazil tz at all, but to transtions to DST after 2038-01-19. When time changes to DST, one hour is skipped. If a Date object is created within this non-existent hour, java.util.Date adds 1 hour to the given time to create a legal point in time. After 2038-0

Re: Date 2042-10-12 problem using Brasilia time zone

2008-11-04 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2008-11-04 16:55:47): > Played around with java.util.Date and found that it is done correctly > up to and including 2037 and errouneously from 2038. That is, given that the change to DST for Brazil is the second Su

Re: Date 2042-10-12 problem using Brasilia time zone

2008-11-04 Thread Bernt M. Johnsen
Played around with java.util.Date and found that it is done correctly up to and including 2037 and errouneously from 2038. I don't think it's a coincidence that the 32-bit number of seconds since 1970-01-01 expires (or wraps around) on 2038-01-19... -- Bernt Marius Johnsen, Staff Engineer Dat

Re: Date 2042-10-12 problem using Brasilia time zone

2008-11-04 Thread Bernt M. Johnsen
Hav you tried the tzupdater to see if the lates version of tzdata fixes the problem? tzdata2008g/TZupdater 1.3.9 is newer than JRE 6u10 and contains changes for Brazil. Thomas Mueller wrote (2008-11-03 18:41:03): > Hi, > > I submitted a bug in JSE. > > Regards, > Thomas > > > On

Re: Date 2042-10-12 problem using Brasilia time zone

2008-10-31 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2008-10-31 15:45:18): > Although I can't shed any light on the Java/JavaDB problem, I can > clarify a bit on DST and Brazil. Brazil decided by law 2008-09-08 that > at 00:00 the third Sunday in October (which

Re: Date 2042-10-12 problem using Brasilia time zone

2008-10-31 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2008-10-31 15:45:18): > Although I can't shed any light on the Java/JavaDB problem, I can > clarify a bit on DST and Brazil. Brazil decided by law 2008-09-08 that > at 00:00 the third Sunday in October (which

Re: Date 2042-10-12 problem using Brasilia time zone

2008-10-31 Thread Bernt M. Johnsen
Although I can't shed any light on the Java/JavaDB problem, I can clarify a bit on DST and Brazil. Brazil decided by law 2008-09-08 that at 00:00 the third Sunday in October (which is 2008-10-18) is the change from DST to normal time and at 00:00 the third Sunday of February they will change back t

Re: Bug #DERBY-3593

2008-04-10 Thread Bernt M. Johnsen
Bruno Medeiros wrote (2008-04-09 16:10:50): > Hi, > > I found a bug that i`d described in jira, > but no answer up tp now. There is one comment on https://issues.apache.org/jira/browse/DERBY-3593 > Did i do something wrong in the bug post? > > I thought a little strange haven`t fou

Re: Update Substring of a field

2008-04-02 Thread Bernt M. Johnsen
Reginald Johnson wrote (2008-03-30 00:48:33): > Is it possible to update the substring of a field? I'm trying to do > something like this: > > UPDATE tblIntervals SET SessionMouseID = 'ggg', substr(SessionID, 0, 3) = > 'ggg' WHERE SessionMouseID = 'bbb' Neither Derby, nor the SQL s

Re: sql format in *.sql files

2008-02-14 Thread Bernt M. Johnsen
dexter195 wrote (2008-02-14 04:20:13): > > Hi > > I have a load of sql files that i need to be able to import into derby. > > What delimiter do i need at the end of the statements in order for derby to > see it as a seperate query. i presumed that this would be ; but this doesnt >

Re: how to suppress similar rows while copying from one table to another?

2007-11-22 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2007-11-19 10:23:05): > If there exists a column k in your source data which is unique and you > may use the aggregate function MIN on this column you may do something > like: > > INSERT INTO target

Re: Derby Equivalent of MySql queries

2007-11-22 Thread Bernt M. Johnsen
Hi, Aneez Backer wrote (2007-11-21 20:05:01): > Thanks Bernt. > > That helped Just a small question: Is there some special (e.g. performance) requirements that force you to maintain the data in TABLEB? Since SELECT TAGCOUNT FROM TABLEB WHERE ID=xxx; should give the same result as

Re: Derby Equivalent of MySql queries

2007-11-21 Thread Bernt M. Johnsen
ne, you have written "O.TAG_ID" > and for the second one its "N_TAG_ID" > > Which is correct?? the dot operator or the underscore ?? > > > thanks > aneez > > > > "Bernt M. Johnsen" <[EMAIL PROTECTED]> wrote: Hi, > &

Re: Derby Equivalent of MySql queries

2007-11-21 Thread Bernt M. Johnsen
Hi, BEGIN/END is part of SQL PSM and not supported by Derby. In addition you can't write NEW.TAG_ID or OLD.TAG_ID but have to use a "refernecing clause" (See http://db.apache.org/derby/docs/dev/ref/rrefsqlj89752.html). This as according to the SQL spec. In your case, the triggers can be rewritten

Re: how to suppress similar rows while copying from one table to another?

2007-11-19 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2007-11-19 10:23:05): > Hi, > > >>>>>>>>>>>> Dag H. Wanvik wrote (2007-11-17 02:37:27): > > Tried in vain to come up with a clever single INSERT, though. > > De

Re: how to suppress similar rows while copying from one table to another?

2007-11-19 Thread Bernt M. Johnsen
Hi, Dag H. Wanvik wrote (2007-11-17 02:37:27): > Tried in vain to come up with a clever single INSERT, though. Depending on the data, this might be done in SQL with a "clever single INSERT". If there exists a column k in your source data which is unique and you may use the aggregate

Re: Newbie Blues : Unable to connect to derby database using JDBC

2007-11-16 Thread Bernt M. Johnsen
Sorry, this one was intended only for Thomas. Please disregard :-)) >>>>>>>>>>>> Bernt M. Johnsen wrote (2007-11-16 09:56:00): > >>>>>>>>>>>> Thomas Nielsen wrote (2007-11-16 08:17:17): > > It would probably be

Re: Newbie Blues : Unable to connect to derby database using JDBC

2007-11-16 Thread Bernt M. Johnsen
Thomas Nielsen wrote (2007-11-16 08:17:17): > It would probably be better to simply do > >catch (Throwable e) Neineinei. aldri be nybegynnere gjøre "catch Throwable". Det skal man ligge langt unna helt til man er så erfaren at man faktisk vet hva det innebærer. Denne vil cath

Re: Restricting number of connections from a single user

2007-11-13 Thread Bernt M. Johnsen
Well, not quite what you asked for, since this is for the server as a whole, not per "user". >>>>>>>>>>>> Bernt M. Johnsen wrote (2007-11-13 14:58:41): > Hi, > > >>>>>>>>>>>> Jørgen Løland wrote (2007-1

Re: Restricting number of connections from a single user

2007-11-13 Thread Bernt M. Johnsen
Hi, Jørgen Løland wrote (2007-11-13 14:35:27): > A client/server Derby will soon be used in a university course to teach > students SQL etc. > > Previous experience has revealed that students who are not familiar with > Java programming and JDBC/DBs tend to open a new connection fo

Re: Problem with group by with Derby

2007-11-13 Thread Bernt M. Johnsen
Hi, I guess you get the error message ERROR 42X04: Column 'something' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTE

Re: Distributed Protocol Error

2007-11-07 Thread Bernt M. Johnsen
tp://db.apache.org/derby/docs/dev/adminguide/cadminssl.html > > > Thanks, > Suman > -Original Message- > From: Bernt M. Johnsen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 5:25 PM > To: Derby Discussion > Subject: Re: Distributed Protocol Error >

Re: Distributed Protocol Error

2007-11-07 Thread Bernt M. Johnsen
Hi, Suman N wrote (2007-11-07 10:56:22): > I have been getting the following error when I execute an executeupdate > on a batch of queries from my application. What should I do to avoid or > eliminate this error? The message indicates that either 1) some application not talking th

Re: Case insensitive indexed search possible?

2007-11-02 Thread Bernt M. Johnsen
Rick Hillegas wrote (2007-11-02 05:21:09): > Hi Jon, > > The situation with case-insensitive searching did not change in the > latest 10.3 release and no one has volunteered to address this issue in > the next feature release, 10.4. If you want to avoid the full table > scan, you c

Re: NULL checking in Derby

2007-10-31 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2007-10-31 09:48:14): > Hi, > > >>>>>>>>>>>> Soumen Saha wrote (2007-10-26 22:36:19): > > DELETE FROM QUIZ_OPTIONS_INFO WHERE OPTION_TEXT IN ('',null); > >

Re: NULL checking in Derby

2007-10-31 Thread Bernt M. Johnsen
Hi, Soumen Saha wrote (2007-10-26 22:36:19): > DELETE FROM QUIZ_OPTIONS_INFO WHERE OPTION_TEXT IN ('',null); > This statement is strictly not allowed in SQL since the data type of null is not determinable. You should write something like DELETE FROM QUIZ_OPTIONS_INFO WHERE OPTION_T

Re: PreparedStatement problem with big BLOBS

2007-09-24 Thread Bernt M. Johnsen
Kathey Marsden wrote (2007-09-21 09:14:50): > Mikael wrote: > >Hi ! > > > >I have a pretty weird problem, I use a Derby 10.3.1.4 with the > >ClientDriver and I run the code below: > > > >// Data is a byte[] vector > >ByteArrayInputStream is = new ByteArrayInputStream( data);

Re: Concerning UNIQUE keys

2007-08-16 Thread Bernt M. Johnsen
adedayo damilola wrote (2007-08-16 14:05:27): > After reading the Derby document(s) I discovered that the UNIQUE > constraint in Derby does not allow NULL values to be inserted into a > cloumn with the constraint applied. So I was wondering if there was > another way to achieve since t

Re: check if DB exists already?

2007-08-09 Thread Bernt M. Johnsen
Teja wrote (2007-08-09 14:09:27): > > If the database doesn't exist, I need to initalize it, create some tables and > stuff... What should I do instead? try { c = DriverManager.getConnection('...url...'); } catch (SQLException.) { c = DriverManager.getConnection('...url...;

Re: REPLACE INTO/INSERT IF NOT EXIST

2007-06-19 Thread Bernt M. Johnsen
Kurt Huwig wrote (2007-06-19 14:44:21): > I must admit, that I did not read the JDBC 4.0 specs yet. Still IMHO > having a cluster solution that mandates you to add handling code to > every SQL command you execute is not a good idea, because I think > this is the job of the cluster solu

Re: REPLACE INTO/INSERT IF NOT EXIST

2007-06-19 Thread Bernt M. Johnsen
>>>>>>>>>>>> Kurt Huwig wrote (2007-06-19 13:46:03): > Am Dienstag, 19. Juni 2007 schrieb Bernt M. Johnsen: > > Ok, I see. I assumed that if HA-jdbc got an SQLException from one of > > the nodes, the complete transaction was rolled back on all nod

Re: Characters and bytes

2007-06-19 Thread Bernt M. Johnsen
Williamson, Nick wrote (2007-06-19 11:09:34): > Hi all, > > In Oracle, you can specify character columns widths in bytes (the > default) or characters. The advantage of specifying column width in > characters is that you can attempt to store - say - 10 multi-byte > characters in a VAR

Re: REPLACE INTO/INSERT IF NOT EXIST

2007-06-19 Thread Bernt M. Johnsen
>>>>>>>>>>>> Kurt Huwig wrote (2007-06-19 12:34:38): > Am Dienstag, 19. Juni 2007 schrieb Bernt M. Johnsen: > > >>>>>>>>>>>> Kurt Huwig wrote (2007-06-19 10:46:09): > > > Unfortunately, both are not an opti

Re: REPLACE INTO/INSERT IF NOT EXIST

2007-06-19 Thread Bernt M. Johnsen
Hi, Kurt Huwig wrote (2007-06-19 10:46:09): > Hi, > > I am using HA-JDBC as a clustering solution and having a problem with > exceptions due to duplicate keys. The application is multi-threaded, > multi-JVM and needs to insert records into a table if they do not exist yet. > It is

Re: User/password encryption and deployment

2007-06-18 Thread Bernt M. Johnsen
David Van Couvering wrote (2007-06-17 18:14:38): > Oh, I get it now, 10.3 will add support for SSL. But this will > encrypt all network traffic. If you just want to encrypt the > password, you have to use the existing password encryption > functionality (either ENCRYPT or STRONG SUBS

Re: User/password encryption and deployment

2007-06-17 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2007-06-16 18:43:51): > >>>>>>>>>>>> [EMAIL PROTECTED] wrote (2007-06-16 07:53:55): > > [...] > > > There is, however small issue, if you choose > > > ENCRYPTE

Re: User/password encryption and deployment

2007-06-16 Thread Bernt M. Johnsen
[EMAIL PROTECTED] wrote (2007-06-16 07:53:55): > [...] > > There is, however small issue, if you choose > > ENCRYPTED_USER_AND_PASSWORD_SECURITY, newer Sun JCE's (from 1.4, I > > think) does not support the shared DHS value defined in the DRDA > > protocol. It's too weak. As an alterna

Re: User/password encryption and deployment

2007-06-16 Thread Bernt M. Johnsen
Michael Segel wrote (2007-06-16 00:23:56): > Which is why I'm a little suspect that the *only* way to do encryption on > the wire is to be forced to bring in IBM's JCE. You don't need the IBM JCE. Sun's JDK comes with and JCE which works just fine. The docs tries to tell you that if y

Re: securityMechanism for network client - can't make it work

2007-06-15 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2007-06-16 00:39:02): > >>>>>>>>>>>> David Van Couvering wrote (2007-06-15 15:21:28): > > Thanks, Bernt, that was it. BTW, "8" is not a very helpful property > >

Re: securityMechanism for network client - can't make it work

2007-06-15 Thread Bernt M. Johnsen
mnemonics, rather than just the number. > I'll log a bug. Also, nowhere in the docs does it say this is what > you need to do. I'll log a bug for that too. There is support for mnemonics... just use STRONG_PASSWORD_SUBSTITUTE_SECURITY instead of 8. > > David > > On 6/15

Re: securityMechanism for network client - can't make it work

2007-06-15 Thread Bernt M. Johnsen
MT > > client URL (from SquirrelSQL): > > jdbc:derby://localhost:1527/travel;create=true;securityMechanism=8 > > On 6/15/07, Bernt M. Johnsen <[EMAIL PROTECTED]> wrote: > >Hi, Are you sure you use Derby 10.2.1.6 or newer? The error response > >seems to indicate an earlier ve

Re: securityMechanism for network client - can't make it work

2007-06-15 Thread Bernt M. Johnsen
Hi, Are you sure you use Derby 10.2.1.6 or newer? The error response seems to indicate an earlier version. Bernt David Van Couvering wrote (2007-06-15 12:12:38): > OK, I'm completely flummoxed. I am trying to use strong password > mechanism instead of password in the clear, in an

Re: syntax for column names

2007-06-06 Thread Bernt M. Johnsen
[EMAIL PROTECTED] wrote (2007-06-06 09:04:30): > Hi > > I have a legacy DB2 table which has a special character like '#' in the > column name like ACCT#. I am using derby for in-memory unit testing. Derby > does not allow me to have a special character like '#' in the column name

Re: Connection refused

2007-06-06 Thread Bernt M. Johnsen
Hi, Steve Pannier wrote (2007-06-05 10:28:18): > Hi all. > > I'm trying to access the network server using the network client driver. > I connect to my database from a remote client and keep getting the > connection refused error. Even when I connect from the local system, I > get t

Re: What is the UPDATE syntax for using two tables?

2007-05-29 Thread Bernt M. Johnsen
Luan O'Carroll wrote (2007-05-28 09:18:22): > The SQL given is for SQLServer and I can't find the correct SQL for > Derby, the problem being that Derby doesn't support the FROM clause in > an UPDATE statement. > > I've tried the following: > > UPDATE TEMP_RATES > SET TEMP_RATES.Lev

Re: What is the UPDATE syntax for using two tables?

2007-05-25 Thread Bernt M. Johnsen
[EMAIL PROTECTED] wrote (2007-05-25 09:29:23): > Luan O'Carroll <[EMAIL PROTECTED]> writes: > > > I have a SQL Server query that I am trying to port to Derby but I > > can't find the right syntax. Is there any documentation? > > > > The SQLServer query is: > > > > UPDATE TEMP_RATES >

Re: maxrows - what does it really mean?

2007-05-16 Thread Bernt M. Johnsen
David Van Couvering wrote (2007-05-15 10:10:52): > I can imagine myself writing a nice little API that sets the offset > limit, and then have a "pluggable" implementation for each of the > drivers. But of course, that's what JDBC is supposed to do for me >:) I have suggested for next

Re: maxrows - what does it really mean?

2007-05-14 Thread Bernt M. Johnsen
Lance J. Andersen wrote (2007-05-14 16:38:03): > Also, there are not a lot of DBs that support that syntax... :-( As far as I know, it's supported by DB2, MSSQL and Oracle (not quite pretty close anyway). MySQL and PostgreSQL has this non-standard LIMIT/OFFSET stuff. -- Bernt Mariu

Re: maxrows - what does it really mean?

2007-05-14 Thread Bernt M. Johnsen
David Van Couvering wrote (2007-05-14 13:11:00): > Thanks for the tip, Bernt, but I must humbly say "yuck!" to the syntax. > > OK, getting over that, it's pretty worthless to me given that Derby > doesn't use it and Derby is the primary DB used by NetBeans. But > let's say it was im

Re: maxrows - what does it really mean?

2007-05-14 Thread Bernt M. Johnsen
t;window functions" for more details. This is not implemented in Derby (Feature T611 Elementary OLAP operations http://wiki.apache.org/db-derby/SQLvsDerbyFeatures), > > Thanks, > > David > > On 5/14/07, Bernt M. Johnsen <[EMAIL PROTECTED]> wrote: > >What

Re: maxrows - what does it really mean?

2007-05-14 Thread Bernt M. Johnsen
What David wants, is the feature rgistered in https://issues.apache.org/jira/browse/DERBY-581 Craig L Russell wrote (2007-05-13 12:06:38): > >Also, how is maxrows related to the fetch size of a ResultSet? > > As I understand it, the fetch size relates to the number of rows > return

Re: Insert JAVA_OBJECT in embedded Derby DB

2007-05-04 Thread Bernt M. Johnsen
You need to serialize the object. One way of doing it is like this: ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(item); oos.close(); ps.setBytes(1, bos.toByteArray()); An vice

Re: Help reading transaction logs

2007-05-03 Thread Bernt M. Johnsen
Hi, Don't know why you get a null result, it might be that you should position after some preamble or something like that. But, I'm curious about what you really want to achieve? There might be better ways to do it than reading the transaction log. Bernt Andy Stewart wrote (2007-0

Re: Problem in release connection

2007-03-21 Thread Bernt M. Johnsen
Hi, Maybe it would help to close the prepared statement befor you close the connection, which also would be the natural way of cleaning up. Bernt Shambhu wrote (2007-03-21 18:55:29): > Hi, > > I am using Cloudscape(IBM Cloudscape Version 10.1) and derbyclient.jar > provided by derb

Re: How to execute optimizer overrides in a java app

2007-03-10 Thread Bernt M. Johnsen
I think this discussion is another arument for https://issues.apache.org/jira/browse/DERBY-1749 Then an example could be ResultSet rs = s.executeQuery( "SELECT num, addr FROM derbyDB /*derby-properties index=IDX1*/ order by num"); while "SELECT num, addr FROM derbyDB /*derby-properties

Re: profiling the derby code: statement compiler is sub-par

2007-03-07 Thread Bernt M. Johnsen
Hi, With this result i would guess that you do something like (Derby is compiling a new statement for each iteration): Statement s = conn.createStatement(); for (int i=0;i<200;i++) { s.executeUpdate("insert into data values("+i+",.)"); } Try something like PreparedStatement s = conn.pre

Re: Does derby support bitwise operators in SQL?

2007-03-02 Thread Bernt M. Johnsen
Hi, Imran Hussain wrote (2007-03-02 10:02:11): > Dan, > > Thanks for the response. I wonder if there is any plan to add support > for this in the future? Not as far as I know, but this is a open source project, and as such this will not be implemented unless someone feels "the itch

Re: prepared statements

2007-02-26 Thread Bernt M. Johnsen
Hi, This behaviour is defined in the JDBC specification. Amir Michail wrote (2007-02-26 14:46:33): > Hi, > > Why is it that prepared statements are created with respect to a > connection? > > Why can't you share a prepared statement across connections? > > Amir -- Bernt Marius

Re: Atomic check for row existence and insert if doesn't exist

2007-02-14 Thread Bernt M. Johnsen
Hi, Ace Jayz wrote (2007-02-12 09:50:22): > > > Ace Jayz wrote: > > > > > > If REPEATABLE READ is in effect, then no other transaction would be able > > to delete the row between the insert and the select because this would > > result in > > different results for the select statem

Re: Atomic check for row existence and insert if doesn't exist

2007-02-10 Thread Bernt M. Johnsen
Ace Jayz wrote (2007-02-09 21:08:44): > I've got a table with an identity column, P, as a primary key. This table > has another column, C, with a uniqueness constraint. I want to insert a row > into the table if no row has a value for C=c, and if a row does exist whose > column C=c I

Re: Derby fully sql-2003 compliant?

2007-02-01 Thread Bernt M. Johnsen
[EMAIL PROTECTED] wrote (2007-02-01 19:15:16): > Christian Lang <[EMAIL PROTECTED]> writes: > > > Hi, > > > > I'm trying to understand which SQL language subset Derby is using. I > > installed version 10.2.2.0 and tried to compile and execute the following > > statement: > > > >

Re: Date Arithmetic - Add 5-day DURATION to CURRENT_DATE

2007-01-31 Thread Bernt M. Johnsen
Anders Morken wrote (2007-01-31 15:49:46): > Sisilla: > > How do I insert a date value of 5 days after the current date to a column > > called 'responseDate' in a table called 'quotationRequest'? Perhaps, it > > would be similar to the following?-: > > > > INSERT INTO quotationRequest

Re: Derby and 2007 Extended DST

2007-01-27 Thread Bernt M. Johnsen
>>>>>>>>>>>> Bernt M. Johnsen wrote (2007-01-25 22:08:28): > >>>>>>>>>>>> Darryl Bowler wrote (2007-01-25 14:33:13): > > Does anyone know if Derby is affected by this years Extended Daylight > > Saving Time? If

Re: Derby and 2007 Extended DST

2007-01-25 Thread Bernt M. Johnsen
Darryl Bowler wrote (2007-01-25 14:33:13): > Does anyone know if Derby is affected by this years Extended Daylight > Saving Time? If so, is there a fix? Derby is indirectly affected through the Java VM. If the VM is correct, then Derby will behave correctly. You will have to check ou

Re: Derby row locking semantic

2007-01-18 Thread Bernt M. Johnsen
Mamta Satoor wrote (2007-01-18 13:54:28): > Hi, > > I might be showing my ignorance here but will probably learn in the process. > I looked at > http://db.apache.org/derby/docs/10.2/devguide/cdevconcepts15366.html and > found under Table 3 that for TRANSACTION_READ_COMMITTED, it is po

Re: Derby-638 not actually resolved ?

2006-12-13 Thread Bernt M. Johnsen
Hi, I'm still not able to figure out what's wrong. Are you able to write a reproduction of the bug which I may run? Xanana Gusmao wrote (2006-12-13 04:18:45): > Bernt, > > > 3) I would really hae liked to take peek at the connection pool your > >are using to figure out what hap

Re: StatementCache & connection pool

2006-12-12 Thread Bernt M. Johnsen
Xanana Gusmao wrote (2006-12-07 04:36:02): > Hi, > > Assume that I obtain my Connections from a ConnectionPool. If I return a > Connection to the pool, is the statement cache emptied ? Most likely not, but might be dependent on the connection pool implemenattion. > > Thanks > > X

Re: Derby-638 not actually resolved ?

2006-12-12 Thread Bernt M. Johnsen
Hi, Some comments: 1) It is considered good parctice to clase all JDBC object when they are not needed and free the underlying db resources as quicklya s possible. 2) Closing connections before statements is obviously not correct but probably harmless in most situations. 3) I would rea

Re: unique columns must be nullable ?

2006-12-12 Thread Bernt M. Johnsen
Hi, Michael Bouschen wrote (2006-12-12 10:36:21): > Hi, > > I ran into the same problem (not in the context Hibernate): I tried to > define a unique index on a nullable column which does not work with > derby. Here is what the derby doc says in the CONSTRAINTS section: > UNIQUE S

Re: unique columns must be nullable ?

2006-12-12 Thread Bernt M. Johnsen
Xanana Gusmao wrote (2006-12-12 04:08:39): > On this page http://wiki.apache.org/db-derby/HibernateHelp > it says: > > "Hibernate Annotations do not work because Derby does not allow a unique > column > to be nullable" > > Is this (that Derby's unique column must be non-nullable) st

Re: (10.1.1.0) Cannot close active connection

2006-12-06 Thread Bernt M. Johnsen
Xanana, It could be that you're hitting https://issues.apache.org/jira/browse/DERBY-2084 or https://issues.apache.org/jira/browse/DERBY-638 Bernt Xanana Gusmao wrote (2006-12-06 09:26:40): > Kristian, > > In terms of upgrading, I will come back to you later on that. This is a > pro

Re: Derby in webstart

2006-12-04 Thread Bernt M. Johnsen
Ole-H wrote (2006-12-04 01:41:12): > > derby.system.home is pointing to a locale directory, but derby tries to get > some files like "org/apache/derby/loc/m2_no_NO.properties" witch doesn't > exist so the jnlpClassloader tries to find them on the address specified in > the codebase in

Re: R: Use SQL parsing

2006-11-30 Thread Bernt M. Johnsen
Flavio Palumbo wrote (2006-11-29 09:55:02): > Hi Bernt, > > I tried this way but it seems to me that the parsing is really light ... I'd > like to get a deeper parse. I don't think you can get it any deeper without execuing the statement. What kind of errors do you expect to catch?

Re: Use SQL parsing

2006-11-29 Thread Bernt M. Johnsen
Flavio Palumbo wrote (2006-11-29 09:11:10): > Hi all, > > maybe a bit OT ... but I'd like to use the SQL parsing engine of Derby ; my > goal is to validate a string to say it's a correct SQL statement, before to > execute it. > > Is it possible with no headache ?? The easiest way is

Re: Limiting select results

2006-11-27 Thread Bernt M. Johnsen
Charlie Babitt wrote (2006-11-25 14:53:23): > Hallo! > > How can I limit the maximum rows that are returned in a select in apache > derby? select * from table LIMIT 10; (as it works in postgres) gives me a > syntax error at 10 > > Any help would be great... What about statemen

Re: Date - Timestamp format for inserts?

2006-11-19 Thread Bernt M. Johnsen
Bryan Pendleton wrote (2006-11-19 11:53:16): > >What's wrong with this statement? > > Although the doc in > http://db.apache.org/derby/docs/dev/ref/rrefsqlj27620.html > appears to say that the minutes and seconds portions of the timestamp value > can > be ommitted, the code does not

  1   2   >