Re: How TO: Import Data into an Access Database

From: Val Mazur (group51a_at_hotmail.com)
Date: 05/29/04


Date: Fri, 28 May 2004 22:32:32 -0400

Hi Tony,

Are you trying to execute this statement against Access database? If yes,
then. I believe, OPENROWSET is not supported in Access. It is a part of
Transact SQL for SQL Server

-- 
Val Mazur
Microsoft MVP
"Tony" <lasallsoft@aol.com> wrote in message 
news:8A0C6C08-86F4-4E0B-AF6B-80EA92647505@microsoft.com...
> 'Import by using OPENROWSET and SELECT query.
>    strSQL = "SELECT * INTO tblCustomers FROM " & _
>        "OPENROWSET('Microsoft.Jet.OLEDB.4.0', " & _
>        "'Excel 8.0;Database=D:\testlib\xltest.xls', " & _
>        "'SELECT * FROM [sheet1$]')"
>
> Syntax error in from clause
>
> Tony