Board index » delphi » D5 MSSQL2000 Timestamp Insert error

D5 MSSQL2000 Timestamp Insert error

I get EOleException with message "Multiple-step operation generated errors.
Check each status value".
The error occurs, when using  when posting inserted record by pressing
DBNavigator post key!

I'm using ADODataSet with default values except:
  CommandText (= 'select * from Kayttaja') and
  Connection

On the form there is also
  DBNavigator and
  TDBGrid or
  DBEdit
with default values (except dataset, etc)

Table resides on MS SQL2000 and there is trigger which updates Timestamp
field containing isertion date/time.
The error DOES NOT OCCUR if this timestamp field is no assiged to a
data-aware component on the form!!!

Could anybody help me why this happens?

 

Re:D5 MSSQL2000 Timestamp Insert error


Not sure I completely understand what you are doing, but the SQLServer
timestamp field is strictly maintained by the server, not you. You shouldn't
try to change it.

Bruce

Quote
> Table resides on MS SQL2000 and there is trigger which updates Timestamp
> field containing isertion date/time.
> The error DOES NOT OCCUR if this timestamp field is no assiged to a
> data-aware component on the form!!!

Re:D5 MSSQL2000 Timestamp Insert error


For clarity I ment datatime field type instead of MSSQL timestamp field
type.

I can override this by following way:
-in ADODataSet beforepost event I issue command
    DataSet.disablecontrols;
-in ADODataSet AfterPost event I issue commands
    DataSet.Refresh;
    DataSet.enablecontrols;

It seems to work, but it would be nice to have some insight into issue.

Quote
"Juha Seila" <juha.se...@taksihelsinki.fi> wrote in message

news:3b713a7e_2@dnews...
Quote
> I get EOleException with message "Multiple-step operation generated
errors.
> Check each status value".
> The error occurs, when using  when posting inserted record by pressing
> DBNavigator post key!

> I'm using ADODataSet with default values except:
>   CommandText (= 'select * from Kayttaja') and
>   Connection

> On the form there is also
>   DBNavigator and
>   TDBGrid or
>   DBEdit
> with default values (except dataset, etc)

> Table resides on MS SQL2000 and there is trigger which updates Timestamp
> field containing isertion date/time.
> The error DOES NOT OCCUR if this timestamp field is no assiged to a
> data-aware component on the form!!!

> Could anybody help me why this happens?

Re:D5 MSSQL2000 Timestamp Insert error


Thank You for Your response Bruce. I have to timestamp term a little too
freely. I actually meant just datetime field type.

And what I am actually doing is that I have just basic data editing form.
The form works just fine, except when I am posting inserted record.

I get this error if this datetime field is on that form either in DBGrid or
as DBEdit.
The only thing, that is special, is that on server side there is an insert
trigger which updates this datetime field.

Juha

Quote
"Bruce" <exnihilo...@hotmail.com> wrote in message news:3b715f01_2@dnews...
> Not sure I completely understand what you are doing, but the SQLServer
> timestamp field is strictly maintained by the server, not you. You
shouldn't
> try to change it.

> Bruce

> > Table resides on MS SQL2000 and there is trigger which updates Timestamp
> > field containing isertion date/time.
> > The error DOES NOT OCCUR if this timestamp field is no assiged to a
> > data-aware component on the form!!!

Re:D5 MSSQL2000 Timestamp Insert error


Try refreshing the query right after changing the data. If you need to, use
a bookmark on the current record to keep track of where you are at.

Bruce

Quote
> I get this error if this datetime field is on that form either in DBGrid
or
> as DBEdit.
> The only thing, that is special, is that on server side there is an insert
> trigger which updates this datetime field.

> Juha

Other Threads