AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi Cached Update to ADO Migration Question
Thema durchsuchen
Ansicht
Themen-Optionen

Cached Update to ADO Migration Question

Ein Thema von Quailin · begonnen am 12. Dez 2005 · letzter Beitrag vom 12. Dez 2005
 
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#2

Re: Cached Update to ADO Migration Question

  Alt 12. Dez 2005, 13:37
I've used a book by Andreas Kosch, which is in german ('ADO und Delphi'). It explaines very well how to use the ltBatchOptimistic Mode. Of course it works.

However, our preferred method is to completely ignore these features and build our own SQL statements in order to batch update or whatever. One big mistake in ADO is that it is not able to produce 100% correct updates which only take a key field as a filter condition:

Suppose you have a table 'Foo' with 2 fields 'fID' (your primary key) and 'fBar' (a string or whatever).
If you execute a post against that ADO-table, ADO will generate something like this:
Update Foo set fBar='NewValuewhere fID = 1 and fBar='OldValue' The last 'and fBar...' is completely stupid and might even cause the whole statement to crash. We just never found a proper way to do accurate and fast updates that always worked under all conditions. To get even worse, we use 'updatable views' in our SQL-server, which is a very cool feature, but not fully supported by ADO.

Now, we simply generate a script containing all the updates, inserts, linking etc. and execute this using MyAdoConnection.Execute within a transaction. Nothing is faster than that. This gives us the ultimate control on how and what to change, update and delete.

BDE is a pain in the a***, but it's TUpdateSQL component was really something.
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:21 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz