Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 669
  • Last Modified:

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
0
PErdu
Asked:
PErdu
  • 2
1 Solution
 
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
 
leonstrykerCommented:
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
 
PErduAuthor Commented:
More a work around than a solution
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now