> So my question is: why do I not see the new 54 table2 records that my
> program says have been created?
>
>
Perhaps you didn't COMMIT the 54 records in your test program?
Perhaps your test program is using a different Derby database than you're
looking at with NetBeans?
Perhaps your test
Hi Rick, John, Bryan et al
Things are a *little* clearer now :)
I was a bit premature in stating that all was OK
To try and rectify my problem (without understanding what was wrong)
I changed the index in table2 from a single column (INT) to a 2 column index
(DATE and TIME) exactly as Table1
hello everybody
I looked at the setup of both tables and found that the key in the first,
made up of two fields, had each field NOT NULL
So I applied this to the single field key in table2 - Trade Number
Now - no errors :)
Thanks to all, for such great advice
Bob M
--
View this message in
On 23/05/2017 15:14, Bob M wrote:
The error message(s):
mining routine finished
simulation routine commenced
simulation routine finished
final prediction routine commenced
Prediction_Trend: 0.0
Current Trade Direction:
debug: we get to here(8)
final prediction routine finished
Weka
Hi
Descriptive:
My program runs every six hours.
Two independent tables are setup - each with 4,100 records
On the first run a trade is opened and table 1 has a new record added and
the oldest one is deleted - all OK
On the second run, I am expecting the TRADES table to have a new record
added.
>
> Exactly what would you wish me to post?
>
> Bob M
>
>
Here are some useful guidelines for how to ask a question in a way that
helps others help you:
https://stackoverflow.com/help/mcve
thanks,
bryan
OK John
I have reinitialized the data in table1, table 2 remains static.
After the program has run for 2 times I should have the usual error about a
duplicate key in table2
Exactly what would you wish me to post?
Bob M
p.s. the 2 tables are independent
--
View this message in context:
On 21/05/2017 21:18, Bob M wrote:
I keep feeling that there is something I am not understanding about updating
two different tables in the same dbase
Some reasons an update might fail, off the top of my head:
1) constraint violation in the data inserted into the table (e.g.
primary key or
Thanks Bryan
Good advice..
I have successfully run the program excluding any ref to the TRADES table -
all OK
so it is in the Trades Table code where I am going wrong..
As I use same code with the other table = it seems perplexing
using a debugger - I would love to but
Perhaps you made a change to the code, but forgot to recompile, or forgot
to re-update your JAR files, or made some other simple build mistake.
As a technique for understanding the behavior of your program, commenting
parts of it in and out and re-running the program is a very good technique,
but
The situation has deteriorated..
I have placed /* */ around all code which adds new trade records and which
updates trade records
I was expecting x number of trades to take place and no error messages
Instead I got the following:-
Adding a new trade record
Inserted newest record:- Trading_Date/Trading_Time: 2016-1-11, 12
Oldest record:- Trading_Date/Trading_Time: 2012-02-06, 6
Deleted oldest record
Adding a new trade record Number: 4101
- SQLException -
SQL State: 23505
Error Code: 2
Message: The statement was aborted because it
Hi John
Understanding a bit more now...
I see when I look at the key to table2 it has the identifier
'SQL170412104645890' as stated in the error message
--
View this message in context:
http://apache-database.10148.n7.nabble.com/Updating-2-derby-tables-tp147386p147410.html
Sent
Hi John
Hint: it's always a good idea to give names to your constraints and
suchlike, so that the error message will refer to a name that appears in
your DB schema, rather than a system-generated name like
SQL170412104646890. If you can't figure out which is the violated
constraint referred to in
Hi John
Trade_no_temp2 is a variable
I do not understand why the error message relates this variable to a table?
Bob M
--
View this message in context:
http://apache-database.10148.n7.nabble.com/Updating-2-derby-tables-tp147386p147408.html
Sent from the Apache Derby Users mailing list
On 19/05/2017 23:13, Bob M wrote:
Message: Column 'TRADE_NO_TEMP2' 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 ALTER
I have reinitialized my system and have run my program on a testing platform
At the first time period, everything goes perfectly and it opens a trade but
there is no requirement to update the second of the two derby tables (the
first table is updated OK)
On the second run, the first derby table
Sorry Rick
I may have deleted that line :(
--
View this message in context:
http://apache-database.10148.n7.nabble.com/Updating-2-derby-tables-tp147386p147397.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.
Hi John
As I read it, only Table1 ever gets updated - correctly
The output suggests that Table2 is updated but that is NOT the case
Output:-
Inserted newest record:- Trading_Date/Trading_Time: 2017-5-18, 18
Oldest record:- Trading_Date/Trading_Time: 2012-02-06, 6
Deleted oldest record
Adding a
More code
psInsert = conn.prepareStatement("INSERT INTO TABLE1 VALUES (?, ?, ?)");
statements.add(psInsert);
psInsert.setString(1, );
psInsert.setInt(2, b);
psInsert.setDouble(3, c);
psInsert.executeUpdate();
fw.writetoFile(("Inserted newest
Hi Bob,
It is hard to tell what the problem is from the code below, since that
code only refers to one table. A more complete picture of the code might
suggest some clues.
Thanks,
-Rick
On 5/18/17 3:53 PM, Bob M wrote:
Hi
Until recently I had just the one single derby database table and
21 matches
Mail list logo