Board index » delphi » Standard problem - BDE 3.5 + MSSQL 6.5 + IDENTITYColumn = Insert Fails

Standard problem - BDE 3.5 + MSSQL 6.5 + IDENTITYColumn = Insert Fails

I've seen the problem mentioned several times, but have yet
to see the solution.

I'm switching from Interbase to Microsoft SQL 6.5, and have
created columns that use the IDENTITY property in place of
a Generator and Trigger in Interbase.

Under Interbase, the code worked with the "table.refresh"
suggested in TI2955. However, it doesn't work, getting
totally confused as to what records it has inserted when
I swithced to Microsoft SQL Server 6.5.

I would certainly like to know how others have fixed this
problem.

BDE 3.5
MSSQL 6.5
Delphi 2.01
NT 4.0 Server
NT 4.0 Workstation.

Thanks for the help,
Arvid

 

Re:Standard problem - BDE 3.5 + MSSQL 6.5 + IDENTITYColumn = Insert Fails


The problem you are experiencing is due to a bug in MS-SQL Server that
has to do with Identity fields. This is a bug that Microsoft has
acknowledged,
and they are working on a fix. Expect the fix to show up in SP3 (cross your
fingers!) sometime
in the next 2-3 weeks.

The identity bug seems to strike when SQL Server is stopped and
restarted.  The workaround is to build DBCC CHECKIDENT commands into a
stored procedure, and make the procedure run at startup time by using
sp_makestartup

Hope this helps

Nick Liristis
Intelisoft Systems

Arvid Jedlicka <Arv...@visi.com> wrote in article
<5hfbev$67...@darla.visi.com>...

Quote
> I've seen the problem mentioned several times, but have yet
> to see the solution.

> I'm switching from Interbase to Microsoft SQL 6.5, and have
> created columns that use the IDENTITY property in place of
> a Generator and Trigger in Interbase.

> Under Interbase, the code worked with the "table.refresh"
> suggested in TI2955. However, it doesn't work, getting
> totally confused as to what records it has inserted when
> I swithced to Microsoft SQL Server 6.5.

> I would certainly like to know how others have fixed this
> problem.

> BDE 3.5
> MSSQL 6.5
> Delphi 2.01
> NT 4.0 Server
> NT 4.0 Workstation.

> Thanks for the help,
> Arvid

Other Threads