Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 31.08.05 15:40 
Hi, ich verstehe nicht warum mein AutoInc Feld bei der ParadoxTabelle hochzählt wenn ich ein UPDATE mache?

schaut mal den Code an!

ausblenden Delphi-Quelltext
1:
2:
3:
'UPDATE SEKTOR SET RANG = :IND WHERE ID = :SID'
oder
'UPDATE SEKTOR SET SEKTOR = :SE WHERE ID = :SID'


Ich meine das AutoInc Feld müßte ja nur hochzählen wenn ein INSERT ausgeführt wird und im Anhang die Tabelle!
Einloggen, um Attachments anzusehen!
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 31.08.05 15:55 
Mal abgesehen davon, dass dein Schlüsseldefinition nicht besonders sinnvoll ist, kann dein Problem theoretisch mit dem Update nichts zu tun haben.
Hast du schon debuggt und bei jedem Schritt die Tabelle geprüft (z.B. mit dem DB-Explorer)?
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 31.08.05 17:00 
user profile iconjasocul hat folgendes geschrieben:
Mal abgesehen davon, dass dein Schlüsseldefinition nicht besonders sinnvoll ist, kann dein Problem theoretisch mit dem Update nichts zu tun haben.
Hast du schon debuggt und bei jedem Schritt die Tabelle geprüft (z.B. mit dem DB-Explorer)?


Hey super, mann! Das war der Fehler das ich das Feld SEKTOR auch als Schlüssel gemacht hatte! Aber eigentlich wollte ich dass
die DB Operationen schneller gehen darum habe ich da Schlüssel gesetzt und es wurde auch schneller!

Na ja eigentlich muß die Kopie nachher schnell ausgelesen werden können, für's bearbeiten geht das auch ohne das ich
auf Sektor den Schlüßel setze!

Vieleicht verstehe ich was Falsch? Ist Schlüßel und Index was ganz unterschiedliches?
Vieleicht müßte ich Indicies setzen damit die Leseoperationen schnell gehen, anstatt Schlüßel?

Kann mir einer das erklären?
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 01.09.05 07:02 
In Paradox in ist ein Schlüssel ein Primary Key. Da genügt bei dir das AutoInc-Feld. Alle anderen solltest du als Index definieren.
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Do 01.09.05 07:29 
user profile iconjasocul hat folgendes geschrieben:
In Paradox in ist ein Schlüssel ein Primary Key. Da genügt bei dir das AutoInc-Feld. Alle anderen solltest du als Index definieren.


Vielen Dank! Super Delpher :wink:
LigH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 239

Win98SE, Win2000SP4
D7
BeitragVerfasst: Do 01.09.05 08:20 
Zur Rechtschreibung:

Faustregel -- ein "ß" steht dort, wo der Vokal davor lang ausgesprochen wird. Bei "Schlüssel" spreche ich das "ü" aber kurz aus, schon allein deshalb ist ein "ss" dahinter wahrscheinlicher. ;)