Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 14.04.10 13:35 
Moin Forum,

ich mache gerade meinen ersten Gehversuche mit Firebird, zugegriffen wird mit Zeos-Komponten(ZConnection, ZQuery).

Mit "SELECT * FROM new_table" bekomme ich den Inhalt meiner Tabelle angezeigt.
Mit "INSERT INTO new_table(barcode,laenge) VALUES(123,321)" kann ich einen Datensatz einfügen.
Mit einem erneuten "SELECT * FROM new_table" bekomme ich auch die hinzugefügten Daten zu sehen.

Jetzt starte ich mein Testprogramm zwei mal. Die Daten, die ich mit dem ersten Programm eingefügt habe, sehe ich im zweiten nicht, nachdem ich ein "SELECT * FROM new_table" abgesetzt habe. Erst nach einem Disconnect/Connect kann ich mit "SELECT * FROM new_table" die neuen Daten sehen.

Was mache ich denn falsch, bzw. was habe ich noch vergessen?

Gruß Oliver

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 14.04.10 13:43 
Vermutung: Du hälst die Transaction offen
Lösung: Transaction.Commit aufrufen, und zum Refresh eine neue starten.

_________________
PROGRAMMER: A device for converting coffee into software.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 14.04.10 13:48 
Transaction? Brauche ich noch eine weitere Komponente?
Bis jetzt habe ich nur jeweils 1
- ZConnection
- ZQuery
- DataSource
- DBGrid

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 14.04.10 13:51 
Ach, Zeos, tschuldigung.
Ich selber arbeite mit den IBX Komponenten, und da muss man zwischen IBDatabase und IBQuery noch eine IBTransaction schalten, um das von dir genannte Phänomen zu verhindern.
Gibts nicht sowas wie ZTransaction?

_________________
PROGRAMMER: A device for converting coffee into software.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 14.04.10 13:51 
Ich sehe zumindest keine solche Komponente bei mir.

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mi 14.04.10 15:00 
Ok, habe es gefunden:

Man muß bei TransactionIsolationLevel noch was einstellen: tiReadCommitted läßt die Geschichte so funktionieren, wie ich mir das vorstelle.

Danke noch mal.

Gruß Oliver

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 15.04.10 07:56 
Kann ich mich eigentlich irgendwie benachrichtigen lassen wenn sich ein Datensatz geändert hat?

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Do 15.04.10 09:04 
Neue Frage = neuer Thread.
Aber ja, das geht - such mal nach Firebird Events bzw. Trigger

_________________
PROGRAMMER: A device for converting coffee into software.