craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > JDBC/Database Issues Post New Topic   Post A Reply
DATE column not updating database printer friendly version
next newest post | next oldest post
Author Messages
jamie.roberts{@}amazonenterprisesinc.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Ben,

I am trying to modify a date column in MYSQL which is completely fine
through
the applet, the value can be changed in the display windows only. The
only
problem is that when you check the database or hit the refresh button
on the
applet display, the original value is redisplayed.

I can easily change the value in PHP-MyAdmin for MYSQL, but not via the
applet. Everything else works fine.

I would appreciate any help you could give on this as it is a show
stopper at
present.

Thanks,

Jamie

admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

There may be lot of reasons why the date is not updated. The best way is to look at the quicktable debug messages. Once you enable the debug messages, you will see all the queries which are executed and the values that are updated. Using this you will be able to find the problem. To enable debug messages

yourDBTable.debug = true;

Ben

jamietroberts{@}talk21.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Ben,

I now have some debug feedback. It looks as if dbtable thinks the field is updated but it isn't when it looks at the field values afterwards:

Data updated: oldvalue: null new value: 05/01/2003
Executing sql update orders set orders_ref=?,orders_name=?,orders_date=?,orders_payment=?,orders_paid=?, orders_items=?, orders_total=? where orders_id=? with arguments:
Argument 1: Datatype in database:NUMERIC. Datatype of cell data: java.lang.Integer. Value:10000
Argument 2: Datatype in database:VARCHAR. Datatype of cell data: java.lang.String. Value:yo boiy
Argument 3: Datatype in database:DATE. Value:NULL
Argument 4: Datatype in database:VARCHAR. Datatype of cell data: java.lang.String. Value:V
Argument 5: Datatype in database:CHAR. Datatype of cell data: java.lang.String. Value:Y
Argument 6: Datatype in database:NUMERIC. Datatype of cell data: java.lang.Integer. Value:7
Argument 7: Datatype in database:NUMERIC. Datatype of cell data: java.math.BigDecimal. Value:115.00
Argument 8: Datatype in database:NUMERIC. Datatype of cell data: java.lang.Integer. Value:1

Thanks,

Jamie

admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Jamie,

I tried your same example and it works fine for me. Could you send me the source code and the complete debug messages by email , I will have a look at it.

Ben

admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Based on the code which you send me. There might be a problem with the DataMap class you are using for dates.

c.setDataMap(new DateStringMap());

Can you try removing the above line and rerun the program.

Ben

jamietroberts{@}talk21.co.uk
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

That worked Ben.

I have a question regarding purchasing, could we continue this offline at my private email address.

Thanks,

Jamie

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios