Re: ADO with ACCESS 2007 and EXCEL 2007?
- From: "Sven Pran" <no.direct@xxxxxxxxxxx>
- Date: Mon, 7 Jul 2008 11:03:02 +0200
"Chris.Cheney" wrote
...........................
For access (mdb and accdb) I have had no problems.
But with Excel I have run into a funny situation:
My SQL statement: "SELECT Fieldnames FROM Tablename WHERE Conditions"
works fine if I use the Jet engine with ISAM format 8 (.xls) or the
ACE engine with ISAM format 12 (.xlsx).
But if I try the ACE engine with ISAM format 8 (.xls) then I get an
error from ADODataset1.Open to the effect that table "Tablename" could
not be found. (ADOConnection1.Open seems to having worked OK also in
that case)
Any suggestions?
I have had no problems in testing ACE against Excel 8.0 xls files.
I suggest you post the connection string and the actual SELECT.
Chris
I have two identical Excel workbooks, one ".xls" and one ".xlsx". The code below fails but works OK with Jet as "provider".
From my .pas file: (The dataset name in the connection string is actuallyOpenDialog1.Filename, the essential parts of which are shown below)
const
cS1 = 'SELECT KNr, Lagt, Fakturert, Serie, Antall, Mapper, Salg, Tekst, Kunde';
cF1 = ' FROM Fakturering';
cW1 = ' WHERE Fakturert IS NULL AND Lagt IS NOT NULL';
cQ = cS1 + cF1 + cW1;
..............
AdoConnection1.Connected:=False;
ADOConnection1.Provider := 'Microsoft.ACE.OLEDB.12.0';
ADOConnection1.ConnectionString := 'Data Source=C:\......\#Drift_2008.xls;Extended Properties=Excel 8.0;';
AdoConnection1.Open;
AdoDataset1.Close;
AdoDataset1.CommandText := cQ;
AdoDataset1.Open;
Greatful for possible ideas.
regards Sven
.
- Follow-Ups:
- Re: ADO with ACCESS 2007 and EXCEL 2007?
- From: Chris.Cheney
- Re: ADO with ACCESS 2007 and EXCEL 2007?
- References:
- Re: ADO with ACCESS 2007 and EXCEL 2007?
- From: Sven Pran
- Re: ADO with ACCESS 2007 and EXCEL 2007?
- From: Chris.Cheney
- Re: ADO with ACCESS 2007 and EXCEL 2007?
- Prev by Date: Re: ADO with ACCESS 2007 and EXCEL 2007?
- Next by Date: Re: ADO - Excel Columns problem
- Previous by thread: Re: ADO with ACCESS 2007 and EXCEL 2007?
- Next by thread: Re: ADO with ACCESS 2007 and EXCEL 2007?
- Index(es):
Relevant Pages
|
|