ADO CSV: read file where file name contains "." impossible ?

Hello,

I am trying to read a csv file using ADO.

when my filename is like toto.csv it works fine.

When i set it to to.to.csv it failed...

Does someone have an info on this ?
Is there a workAround or should my files avoid dots ?


conString Provider=Microsoft.Jet.OLEDB.4.0;Data Source=S:\CSV\;Extended Properties='text;HDR=YES;FMT=Delimited'
query : select * from _Lst.login.csv

Thanks a lot
LVL 2
PErduAsked:
Who is Participating?
 
leonstrykerConnect With a Mentor Commented:
The easiest way is to check the file name before hand for the extra dots and replace them with '_' characters.  I found a similar problem when I tried to connect to Excel spreadsheets and the column names had '.' in them. Had go by ordinal to query them.

Leon
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Is there a workAround or should my files avoid dots ?
if found that problem also already, and you have indeed to avoid the dots.
0
 
PErduAuthor Commented:

i don't know if this is linked to the fact Db objects are normally called by [DBNAME].[Owner].[object] but i am trying to see if there is another way but with files containing dots (automatically generated so...)...

i'll let the question open a week to see if someone found a workaround or not

(i found nowhere anyone presenting this problem so at least it will offer the opportunity for people having it to stop looking as mad)
0
 
PErduAuthor Commented:
More a work around than a solution
0
All Courses

From novice to tech pro — start learning today.