Autor Beitrag
pathx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Fr 23.07.04 14:18 
Hallo!

Folgendes Problem:
Ich habe eine einfache Access-DB mit ein paar Tabellen. In Delphi hab ich die DB über ADO eingebunden (MS JET OLE DB). Folgenden Code benutze ich, um die Daten aus einer Tabelle auszulesen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
ADOTable1.open;

while not ADOTable1.EOF do
begin
 ListBox1.Items.add(ADOTable1.FieldByName('ergebnisse').AsString);
 ADOTable1.next;
end;

ADOTable1.close;


Auf meinem Desktop-PC funktioniert das auch ganz Prima. Dann hab ich DB und Programm auf mein Laptop kopiert. Beim Ausführen des Codes gabs die Exeption: Entwerder EOF, BOF oder der aktuelle Datensatz wurde gelöscht. Für die aktuelle Anfrage wird ein aktiver Datensatz benötigt.
Die Exeption wird ausgelöst, wenn ADOTable1.Close aufgerufen wird.
Hat jemand ne Idee, woran es liegen könnte und wie man den Fehler beheben kann? Auf dem einen PC läuft es doch auch.

Vielen Dank,
Peter


Moderiert von user profile iconPeter Lustig: Code- durch Delphi-Tags ersetzt.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Fr 23.07.04 17:16 
Du kannst bei jeder Connection den Cursor-Typ festlegen. Setz den mal auf Server.
Access mag es manchmal nicht, wenn der Cursor Clientseitig festgelegt wurde.
grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 23.07.04 20:39 
Wenn du D5 nutzt, kann es sein, dass du für ADO nen Patch brauchst (selber leidige Erfahrungen damit gemacht). Gibt's bei Borland zum DL.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Poolspieler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45


D5 Prof / D7 Prof
BeitragVerfasst: Fr 23.07.04 21:45 
@BenBE:
Nur so nebenbei, welche Version von D5 meinst Du denn - bei meiner Professionalversion sind die ADO-Komponenten auf jeden Fall nicht dabei...???

Gruß

Poolspieler

_________________
Ich weis, das ich nichts weis, aber was bringt mir das?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 23.07.04 22:06 
Steht doch gleich unter meinem Nick im Post (siehe Links)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Poolspieler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45


D5 Prof / D7 Prof
BeitragVerfasst: Fr 23.07.04 22:07 
:oops: alles klar, ich bin ruhig und behaupte von allem das Gegenteil!!! :oops:

_________________
Ich weis, das ich nichts weis, aber was bringt mir das?