Re: using SELECT as an SQL triggered action

2008-02-12 Thread Dyre . Tjeldvoll
musky [EMAIL PROTECTED] writes: somebody please help me here please!! please!! its urgent... Please see http://www.catb.org/~esr/faqs/smart-questions.html#urgent musky wrote: i will make my aim more clearer here: i have created an AFTER insert trigger on a table called chattable which

Re: derby databse connection in Hibernate

2008-02-12 Thread Dyre . Tjeldvoll
cnapagoda [EMAIL PROTECTED] writes: I try to connect derby database using Hibernate. But I got error like this. Exception in thread main org.hibernate.hql.ast.QuerySyntaxException: USERINFO is not mapped [FROM USERINFO] at

Re: Shutdown of embedded Derby server throws an SQLException?

2008-02-12 Thread Henrik Frisk
The WwdEmbedded.java program that is part of the self-study tutorial in Getting Started with Derby (http://db.apache.org/derby/docs/dev/getstart/, accessible from http://db.apache.org/derby/manuals/index.html) catches the exception that is thrown when shutdown is successful and reports

Re: using SELECT as an SQL triggered action

2008-02-12 Thread Øystein Grøvlen
musky wrote: i will make my aim more clearer here: i have created an AFTER insert trigger on a table called chattable which has two fields(ID INT,Message VARCHAR(255)).here is the trigger: CREATE TRIGGER insert_trigger AFTER INSERT ON chattable REFERENCING NEW_TABLE AS chattableupdate FOR EACH

Re: using SELECT as an SQL triggered action

2008-02-12 Thread Øystein Grøvlen
Øystein Grøvlen wrote: I do not think doing a select in a trigger does not make sense. Sorry, to many negations here. I mean of course that doing a select in a trigger does not make sense. JDBC does not provide you with any way to get hold of the result set. From your description, I think

Re: Get auto increment value

2008-02-12 Thread Peter Yuill
Oops, try statement.executeUpdate(some query, Statement.RETURN_GENERATED_KEYS) - Original message - From: Peter Yuill [EMAIL PROTECTED] To: Derby Discussion derby-user@db.apache.org, derby-user@db.apache.org Date: Wed, 13 Feb 2008 08:52:28 +1100 Subject: Re: Get auto increment value

Re: Get auto increment value

2008-02-12 Thread bruehlicke
Look in the doc for VALUES IDENTITY_VAL_LOCAL() this function gives you the latest ID generated. B-) On Feb 12, 2008 3:41 PM, larsk [EMAIL PROTECTED] wrote: I am making a java-application that uses an apache derby database. One of the fields in one of the tables has auto

Re: Get auto increment value

2008-02-12 Thread bruehlicke
Nice! did not know that s.execute(INSERT INTO + testTable1 + (NAME) VALUES('xyz')); int keyVal = Statement.RETURN_GENERATED_KEYS; System.out.println(KEYVAL = +keyVal); works perfect. B-) On Feb 12, 2008 3:57 PM, Peter Yuill [EMAIL PROTECTED] wrote:

Get auto increment value

2008-02-12 Thread larsk
I am making a java-application that uses an apache derby database. One of the fields in one of the tables has auto increment applied (GENERATED BY DEFAULT AS IDENTITY). Is it possible to get the value that this field is going to get or what value it got when making an insert? Or do I have to make

Newbie question: jdbc:/localhost/dbname doesn't work

2008-02-12 Thread Banibrata Dutta
Hi, I am trying to use Derby (infact from the JavaDB package), on WinXP. I have run the Network Server, using the script (batch file) in one window. In another window, I am using ij. While I can connect to the server using following commands:- ij CONNECT 'jdbc:derby:/firstdb'; ij CONNECT

Re: Rich text format in apache

2008-02-12 Thread Donald McLean
Rich text is just that, text. You can store it in any appropriate length text field (varchar or clob). On Feb 12, 2008 6:52 AM, musky [EMAIL PROTECTED] wrote: how do i store richtext into an apache database? any help will be appreciated. can this be done without using any tags..

Re: derby databse connection in Hibernate

2008-02-12 Thread Donald McLean
I believe that this error means that there is no Hibernate map (hbm.xmlfile) that maps some class to that table in your database. On Feb 12, 2008 1:47 AM, cnapagoda [EMAIL PROTECTED] wrote: ** My datadase name is power_moniter, table name is userinfo. why i'm I got error like that? thank you.

Re: NullPointerException in Derby driver (from at least 10.2.2.0)

2008-02-12 Thread Dyre . Tjeldvoll
Eric Floehr [EMAIL PROTECTED] writes: Daniel, Yes, we see that as well, but not always. Following is the stack trace of that. Did you ever find the solution to the problem? Thanks so much! SQL Error code: 4 SQL State: 08003 java.sql.SQLNonTransientConnectionException: No current

Rich text format in apache

2008-02-12 Thread musky
how do i store richtext into an apache database? any help will be appreciated. can this be done without using any tags.. thanks in advance. -- View this message in context: http://www.nabble.com/Rich-text-format-in-apache-tp15431708p15431708.html Sent from the Apache Derby Users mailing list

RE: Methods for upgrading database and application

2008-02-12 Thread Brad Moore
Thanks for your response. I think I need to clarify a couple of things though. We are not using Access as the front end, we were using it for the database and now that has been converted to Derby. The front end is written in another language that can connect to the database using ODBC or

Virtual Table Tutorial Problem

2008-02-12 Thread dexter195
Hi, I'm very new to Derby and I'm having trouble trying to find any information on how to construct a virtual table/database, so its stored in the ram and then use that to speed up our unit tests. ResultSet rs = s.executeQuery( SELECT * + from

Re: Virtual Table Tutorial Problem

2008-02-12 Thread Jørgen Løland
dexter195 wrote: Hi, I'm very new to Derby and I'm having trouble trying to find any information on how to construct a virtual table/database, so its stored in the ram and then use that to speed up our unit tests. ResultSet rs = s.executeQuery( SELECT * +