BillKilgore
Programmer
Hello everyone,
I’ve been trying to extract some data from an Access DB then I want to insert it into an Excel
File for further analysis (Length, Width, BoardFeet, ProcessTime) rather than write Functions for each view.
The SQL statement works as far as it goes and inserting data from an array into EXCEL shouldn’t be a problem. I was able to, ‘SELECT COUNT’ with a variant of it.
My problem is getting the data from the SQL string into an array of some kind (dynamic, variant, etc). I seem to recall having to creat a temporary table or something and reading from that.
My code looks like this. I can get one tuple out but no more than that. It’s been a long time since my SQL class and I’m out in the field so I haven’t got access to much documentation. Also, I'm running with Vista on a Dell so there's also no Delphi 'Help' function.
With adoqSomeQuery
Close;
SQL.Clear;
SQL.Add('SELECT * FROM Logs WHERE Specie + QuotedStr(SpecieDesignator));
RetrieveLogData := FieldByName('LogNum').AsString;
Active := True;
Open;
SQL.Clear;
Close;
The 'RetrieveLogData' statement was only to see if anything comes out.
Any help would really be appreciated at this point.
Thanks all, Bill Kilgore
I’ve been trying to extract some data from an Access DB then I want to insert it into an Excel
File for further analysis (Length, Width, BoardFeet, ProcessTime) rather than write Functions for each view.
The SQL statement works as far as it goes and inserting data from an array into EXCEL shouldn’t be a problem. I was able to, ‘SELECT COUNT’ with a variant of it.
My problem is getting the data from the SQL string into an array of some kind (dynamic, variant, etc). I seem to recall having to creat a temporary table or something and reading from that.
My code looks like this. I can get one tuple out but no more than that. It’s been a long time since my SQL class and I’m out in the field so I haven’t got access to much documentation. Also, I'm running with Vista on a Dell so there's also no Delphi 'Help' function.
With adoqSomeQuery
Close;
SQL.Clear;
SQL.Add('SELECT * FROM Logs WHERE Specie + QuotedStr(SpecieDesignator));
RetrieveLogData := FieldByName('LogNum').AsString;
Active := True;
Open;
SQL.Clear;
Close;
The 'RetrieveLogData' statement was only to see if anything comes out.
Any help would really be appreciated at this point.
Thanks all, Bill Kilgore