Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-30
4
Medium Priority
?
660 Views
Last Modified: 2013-12-25
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
Comment
Question by:PErdu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18044100
>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
 
LVL 2

Author Comment

by:PErdu
ID: 18045197

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
 
LVL 29

Accepted Solution

by:
leonstryker earned 250 total points
ID: 18048530
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
 
LVL 2

Author Closing Comment

by:PErdu
ID: 31428479
More a work around than a solution
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question