# ... #
const
db_open_table = 1;
db_open_dynaset = 2;
db_open_snapshot = 4;
# ... #
var
Form1: TForm1;
dbengine: variant;
db: variant;
Workspace: variant;
Stream: TStringStream;
RequestInfo: TIdHTTPRequestInfo;
T_Test_HttpServer: variant;
T_Test: variant;
T_Test_Login: variant;
# ... #
procedure Test_Prozedur(Stream:TStringStream);
var
SQL: String;
rs: variant;
begin
#######
SQL ABFRAGE FUNKTIONIERT NICHT #######
SQL := 'Select * From T_Test_Tabelle';
rs :=
db.OpenRecordset(
SQL, db_open_dynaset);
rs.findfirst := 'ID_Test_Login = test';
rs.edit;
rs.Bemerkung.value := 'geänderte Daten';
rs.update;
####### DIESE ABFRAGE HINGEGEN SCHON ########
if not (T_Test_Tabelle.eof and T_Test_Tabelle.bof) then begin
T_Test_Tabelle.movefirst;
while not T_Test_Tabelle.eof do begin
T_Test_Login.seek('=', T_Test_Tabelle.fields[1].value);
if not T_Test_Login.nomatch then begin
Stream.WriteString('[
url="' + requestinfo.Document + '?login=' + ToString(T_Test_Login.fields[0].value) + '"]' + ToString(T_Test_Login.fields[3].value) + '[/
url]');
T_Test_Login.movenext;
end;
T_Test_Tabelle.movenext;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
try
dbengine := CreateOleObject('DAO.DBEngine.36');
except
dbengine := CreateOleObject('DAO.DBEngine.351');
end;
Workspace := dbengine.CreateWorkspace('', 'Admin', '', 2);
db := workspace.opendatabase('D:\Pfad\test.mdb);
T_Test_HttpServer :=
db.openrecordset('T_Test_HttpServer', 1);
T_Test :=
db.openrecordset('T_Test_Tabelle', 1);
T_Test.Index := 'ID_Test_Tabelle';
T_Test_Login :=
db.openrecordset('T_Test_Tabelle', 1);
T_Test_Login.Index := 'ID_Test_User';
end;
# ... #