Autor Beitrag
Ken-san
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 78

WIN: XP, 2000 LINUX: SUSE
Pascal, Delphi 5 Prof, C, C++
BeitragVerfasst: Di 27.01.04 11:13 
HI :(

Ich schreibe Grade ein Programme und komme nicht weiter (ist ja klar wenn ich etwas ins Forum schreibe :P ) Also ich rufe über fünf verschiedene SQL-Querys Daten vom Server ab und muss idese jetzt in eine Andere Datenbank schreiben ... Das versuche ich über Table1.insert allerdings bringt er mir wenn ich das Programm laufen lasse diesen Error:
ausblenden Quelltext
1:
Table1:Cannot perform this operation on a closed Dataset					


Also wleches Dataset meint der denn? Das vom Datasource?
Achja der Error kommt an dieser Stelle

ausblenden Quelltext
1:
2:
3:
Table1.Insert;
Table1.FieldbyName('LiefartNum').AsString := LIEFARTNUM; // in dieser Zeile kommt der Error
Table1.Post;


Wäre echt cool wenn mir hier jemand helfen könnte

Kenny

_________________
SNAFU: Same Normal All f*** Up
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: Di 27.01.04 11:49 
Du schliesst irgendwann vorher Table1 mit dem Aufruf von Close, anders geht es nicht. Suche mal, wo Du manuell ein Close durchführst und ob dieses vor deinem einfügen aufgerufen wird.

Gruß
KidPaddle
MAlsleben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 303

W2k,WinXP
D3 - DXE3 Enterprise
BeitragVerfasst: Mi 28.01.04 07:56 
Hi,

rufe nach Deinem table1.insert Table1.edit auf.


Gruß Micha.

_________________
Viele Wege führen nach Rom.
Ken-san Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 78

WIN: XP, 2000 LINUX: SUSE
Pascal, Delphi 5 Prof, C, C++
BeitragVerfasst: Mi 28.01.04 09:12 
Hi ihr beiden!

Danke für die Hilfreichen Antrworten es funktioniert jetzt :D

Kenny

_________________
SNAFU: Same Normal All f*** Up
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: Mi 28.01.04 09:41 
@MAlsleben:

Warum sollte er daß? Edit rufst Du auf, wenn man einem bestehenden Satz bearbeitern will, also aus dem dsBrowse - Modus in dsEdit geht.

Gleich die erste Anweisung in der Implementierung von TDataset.Edit ist:
ausblenden Delphi-Quelltext
1:
if not (State in [dsEdit, dsInsert]) then					


Wie Du siehst, vollkommen wirkungslos.

Gruß
KidPaddle
Ken-san Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 78

WIN: XP, 2000 LINUX: SUSE
Pascal, Delphi 5 Prof, C, C++
BeitragVerfasst: Mi 28.01.04 10:17 
HI

Ja das stimmt schon! Diese variante hat auch nicht funktioniert aber ich habe ausversehen Das Table geschlossen ist mir ein bisschen Quellcode verrutscht :oops:

danke KID

Kenny