Solved

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

Posted on 2006-11-30
4
588 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
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
>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
Comment Utility

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 125 total points
Comment Utility
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
Comment Utility
More a work around than a solution
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA to format 3 77
Paint/Redraw window while dragging 16 56
Determine Range to Select 5 33
Add a task in Outlook from access 11 32
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now