1

Topic: openrowset and dbf. The file name contains the forbidden characters or too long

Microsoft SQL Server 2008 R2 (SP2) - 10.50.4042.0 (X64) Mar 26 2015 9:18:04 PM
Copyright (c) Standard Edition Microsoft Corporation (64-bit) on Windows NT 6.2 <X64> (Build 9200:) (Hypervisor)
select
*
from
openrowset (
' Microsoft. ACE.OLEDB.12.0'
,' dBASE IV; Database = \\Path'
,' select * from "71190917 (1).DBF"'
)

Error:
The supplier of an OLE DB "Microsoft. ACE.OLEDB.12.0" for a linked server "(null)" returned the message "'" 71190917 (1).DBF "' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.".
The message 7321, level 16, state 2, line 1
Error by request preparation "select * from" 71190917 (1).DBF "" to performance by means of the supplier of an OLE DB "Microsoft. ACE.OLEDB.12.0" for a linked server "(null)".
To rename a file hands I is finite I can, and in this case errors will not be. But each time to correct not a variant.
Whether it is possible to overcome somehow this error without file renaming?
THE ITEM WITH.
At usage of square brackets: select * from [71190917 (1).DBF] produces an error about absence of a file 71190917 [1].DBF

2

Re: openrowset and dbf. The file name contains the forbidden characters or too long

;
1.dbf loads without problems.

3

Re: openrowset and dbf. The file name contains the forbidden characters or too long

gls;
And so ["71190917 (1).DBF"]

4

Re: openrowset and dbf. The file name contains the forbidden characters or too long

TaPaK;
The A Microsoft Access database engine could not find the object ' "71190917 [1].DBF" '. Make sure the object exists and that you spell its name and the path name correctly. If ' "71190917 [1].DBF" ' is not a local object, check your network connection or contact the server administrator.

5

Re: openrowset and dbf. The file name contains the forbidden characters or too long

gls;
Generally like a bracket are not pleasant (1)

6

Re: openrowset and dbf. The file name contains the forbidden characters or too long

TaPaK,
Not in brackets business. I remove brackets, but I leave gaps - it is not loaded.
I leave a title with brackets, but nearby the renamed file - the data is read to a treasure from a file with brackets and gaps.

7

Re: openrowset and dbf. The file name contains the forbidden characters or too long

By practical consideration received that the name dbf - a file should not exceed 8 characters. Presence/absence of brackets does not influence operation.
Similar. That without renaming not to manage

8

Re: openrowset and dbf. The file name contains the forbidden characters or too long

gls;
Aha
https://support.microsoft.com/en-us/hel … or-paradox