procedure TForm2.FormCreate(Sender: TObject);
Var
Bmrk : TBookMark;
CurRecBuffer,RecBuffer : PChar;
n,
Index:integer;
a,test,test2,m:
String;
begin
//testvariablen
test2:=query5.SQL.GetText;
test:=query6.SQL.GetText;
//Query6.active:=true;
//query6.Prepare
//falls DB offen
if query6.Active
then
//datasource6.DataSet.
//datasource6.dataset.Open;
//DataSource6.DataSet.Active :=false;
//DataSource6.DataSet.Active :=true;
//if datasource6.dataset.Active then
//Hier ist die Stelle, die nie erreicht wird
begin
with datasource6.DataSet
do
begin
//open;
CurRecBuffer := StrAlloc(RecordSize);
RecBuffer := StrAlloc(RecordSize);
GetCurrentRecord(CurRecBuffer);
Bmrk := GetBookMark;
DisableControls;
First;n := 0;
while not EOF
do
begin
a:= '
Sach\' + FieldByName('
Vers_Art').AsString;
//PathTreeView1.Items.Add(FieldByName('Vers_Art').AsString);
PathTreeview1.DestPath :=a;
pathtreeview1.AddPath;
PathTreeview1.Items.Item[n].ImageIndex := 1;
PathTreeview1.Items.Item[n].SelectedIndex := 1;
GetCurrentRecord(RecBuffer);
if MemComp(RecBuffer,CurRecBuffer,RecordSize)
then Index := n;
Next;inc(n);
end;
GotoBookmark(Bmrk);
FreeBookmark(Bmrk);
EnableControls;
// FChanging := true;
// ItemIndex := Index;
// FOldIndex := Index;
// FChanging := false;
StrDispose(RecBuffer);
StrDispose(CurRecBuffer);
end;
Close;
end;