1

Topic: Re: Special characters in file name acces 2003

Names of tables, fields,  and so forth for elimination of this sort of problems it is necessary to frame with square brackets.

Rs. Open "select * from [" AND F AND "], cnn

And at you, with single quotes, generally becomes SELECT from a string literal...

2

Re: Re: Special characters in file name acces 2003

And how offered Akina with square brackets tried?

3

Re: Re: Special characters in file name acces 2003

I think that "-" here at anything. It is necessary to specify File name or in square brackets (as to you already advised), or (if there are no gaps in a name) so: Log-2017-09-26 # csv.
Others csv files at you open?
If with brackets it does not turn out - show a line of connection.

4

Re: Re: Special characters in file name acces 2003

S, try with other provider:

strPathtoTextFile = "C:\Databases \"
objConnection. Open "Provider=Microsoft. Jet. OLEDB.4.0;" AND _
"Data Source =" AND strPathtoTextFile AND ";" AND _
"Extended Properties ="" text; HDR=YES; FMT=Delimited """
objRecordset. Open "SELECT * FROM PhoneList.csv", _
objConnection, adOpenStatic, adLockOptimistic, adCmdText

5

Re: Re: Special characters in file name acces 2003

S wrote:

Poprobyval here so
cnn. ConnectionString = "Provider=MSDASQL.1; Persist Security Info=False;" AND _
"Extended Properties ='Driver = {Microsoft Text Driver (*.txt; *.csv)};" AND _
"DriverId=27;Extensions=txt,csv,tab,asc;FIL=text;" AND _
"MaxBufferSize=2048; PageTimeout=5" AND _
"DefaultDir =" AND DatabaseFullPath AND ";" AND _
"Data Source = [" AND F AND "] '"
cnn. CursorLocation = adUseClient
cnn. Open
Rs. Open "select * from [" AND F AND "]", cnn
If F = "D:\Log.csv" all works
If F = "D:\Log-2017-09-26.csv" Rs. Open swears - [Microsoft] [Driver ODBC the Text] object ' D:\Log-2017-09-26.csv ' is not found by a Microsoft Jet database kernel
Help to understand please

Seem file name should be no more than eight characters (reduce to "D:\Log-2017.csv" and look that will be, as a last resort it is possible to name so "D:\20170926.csv")