Board index » jbuilder » Error Message appears when performing Update on a QueryDataSet

Error Message appears when performing Update on a QueryDataSet


2005-02-03 10:17:45 AM
jbuilder17
I have 6 columns (4 String, 2 Timestamp) in a resultset that I generate
by simply specifying
select col1, col2... in the QueryDescriptor. I execute the QueryDataSet
and all the rows appear perfectly fine. Using the navigator tool bar I
click + to add a row. I fill in a bunch of columns (the String columns
because the Timestamps are autogenerated). I click Save, the refresh.
Everything is saved and retrieved fine.
Now I modify an existing row and click Save. I get the following message:
See com.borland.dx.dataset.DataSetException error code: BASE+47
com.borland.dx.dataset.DataSetException: Attempt to get a STRING value
from a TIMESTAMP value.
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
Interestingly, the data has been updated perfectly.
What is causing this Base+47 error? How can I prevent it from being
displayed?
Thanks,
Anthony
 
 

Re:Error Message appears when performing Update on a QueryDataSet

Sorry, I now realize my mistake. I was using a custom resolver that
updates an auditing table when a primary table is changed. I was using
row.getString(i) to get the values from the JdbTable in order to mirror
the primary table. In the UpdatedRow event of the resolver I put the
invalid row.getString(i). The function broke down because I was trying
to get a Timestamp value.
Anthony
Anthony Perera wrote:
Quote
I have 6 columns (4 String, 2 Timestamp) in a resultset that I generate
by simply specifying
select col1, col2... in the QueryDescriptor. I execute the QueryDataSet
and all the rows appear perfectly fine. Using the navigator tool bar I
click + to add a row. I fill in a bunch of columns (the String columns
because the Timestamps are autogenerated). I click Save, the refresh.
Everything is saved and retrieved fine.

Now I modify an existing row and click Save. I get the following message:

See com.borland.dx.dataset.DataSetException error code: BASE+47
com.borland.dx.dataset.DataSetException: Attempt to get a STRING value
from a TIMESTAMP value.
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.throwException(Unknown
Source)


Interestingly, the data has been updated perfectly.

What is causing this Base+47 error? How can I prevent it from being
displayed?

Thanks,

Anthony