Row insert idea's


2005-01-17 01:21:35 PM
jbuilder9
I need some suggestions on how to solve a problem with inserting a row into
an Access database using JBuilders jdbNavToolBar. Its a simple order entry
frame and I've defined an auto-number as the unique key field in the table.
My problem is I when I click the plus button to add a new row to the table
and post that row I don't get the newly generated auto-number value returned
to the frame unless I close the frame and re-open or ineffect refreshing the
query. It was suggested that I add a timestamp field to the row and assign
a timestamp value to a jdbTextField one the frame that would in turn get
passed to the database. Great idea but I'm struggling with the best way to
handle that. I thought maybe on a lost focus event I could assign a
timestamp value but my attempts did not work.
Am I on the right track here or is there a better way? I need some unique
value to grab and pass to a print button I have on the screen that allows
the printing of a hard copy of the newly entered order. I like the
timestamp idea as it shows me when the order was entered.
Thanks in advance,
Dan