Is there a way to make multiple TADOQuery have access to the same session or transaction information?
Both TADOQuery have the same TADOCOnnection, but that doesn't work.
Example - I have one query that generates a temp table, I want to use that temp table in another query, but when I try, it doesn't know about the temp table.
procedure Foo(dbCon : TADOConnection);
var
q1 : TADOQuery; //TODO : set your ADOQuery to use a forward only read only cursor.
q2 : TADOQuery;
begin
q1 := TADOQuery.Create(nil);
q1.Connection := dbCon;
q1.SQL.Text := 'SELECT id INTO #TempT FROM dFTNodes;';
q1.Active := true;
q2 := TADOQuery.Create(nil);
q2.Connection := dbCon;
q2.SQL.Text := 'SELECT id FROM #TempT;';
q2.Active := true; //Fails here does not know table #TempT
end;