Board index » delphi » Interbase and MS SQL Server

Interbase and MS SQL Server

Hi,

I am currently working on a project involving porting a Delphi /
Interbase app. to run on MS SQL Server. Does anybody know which
issuses this involves ?

My first problem was that the generators I use to create a primary key
in Interbase does not exist in MS SQL Server. Any suggestions,
work-arounds ?

Thanks in advance,

Jan Steiermark
v...@vip.{*word*104}city.dk

 

Re:Interbase and MS SQL Server


Quote
> I am currently working on a project involving porting a Delphi /
> Interbase app. to run on MS SQL Server. Does anybody know which
> issuses this involves ?

There is couple of major issues:
1. Locking. MSSQL is lock based server it does mean that if you want to
work with table in it you exclusively lock it even if you just read it. To
prevent unnecesery locking you have to use special SQL syntax extension NO
LOCKS for operators like SELECT and other if required. Meanwhile IB locks
particular record only when you apply transaction to it. So in IB lock
conflict can occure only in case of simultanious applaing of concurent
transactions and in MSSQL lock conflict can occure at any write read
operation conflict. As well usually MSSQL locks whole page even if you
write only 1 record and IB locks only one record each time. So if you try
to change two different records in same page in MSSQL you can have
conflict and you need to handle it in your application.
2. Long transactions (Transisolation = tiRepeatableRead) are not supported
by MSSQL so if you want to make statistical or summary report which take 1
hour time all changes made in this hour will be shown in report. Meanwhile
in IB you just open Repeatable Read transaction and do report on current
state of DB  changes made during reporting will not be shown in report. So
you have to make long reports in MSSQL in the night when nobady update
database or explicitly prohibit chages during reporting.
3. In MSSQL you can use Transact SQL to perform set of actions in one
query it is like stored procedure but you do not have to actually store it
in database. In IB all stored procedures must be present in database.
4. There was couple of issues with MSSQL SQL Links for BDE including issue
with strings, timestamps and other so make sure you have latest BDE
installed. IB SQL Links for BDE always worked ok.

Quote
> My first problem was that the generators I use to create a primary key
> in Interbase does not exist in MS SQL Server. Any suggestions,
> work-arounds ?

There is identity datatype in MSSQL which generates field values
automatically.

Artem.

Re:Interbase and MS SQL Server


On Wed, 09 Jun 1999 09:55:12 -0400, Artem Kornilov <ar...@altair.com>
wrote:

Quote
>> I am currently working on a project involving porting a Delphi /
>> Interbase app. to run on MS SQL Server. Does anybody know which
>> issuses this involves ?

<big snip>

I just wanted to add that I recall there being an issue with triggers.

It may be that MSSQL doesn't have the possibility to execute trigger
code *before* inserting, updating and deleting.  This could be a
problem if you have IB triggers that handle cascade updates and
deletes.  I'm not sure this applies to version 7 though.

(Hoping somebody corrects me, if I'm wrong)

Regards,

--
Marco Rocci
MicroEra srl
Turin, Italy
-----------------
vota contro lo SPAM su: http://www.politik-digital.de/spam/

Other Threads