Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008
    Posts
    1

    Red face Unanswered: ADODB - Data Source Contains Apostrophe

    I wrote some code that populates a table with a full path of thousands of Excel files. I'm then using these paths in connection string using ADO. I am reading the data from the various sheets and storing the data in another table. My problem is that a number of the Excel file names include apostrophe's or even a double quote to signify inches. As long as the program doesn't run into one of these files my code works great.

    How do I resolve this? Do I need to parse the string by locating the single and or double quotes and replace them with something? Any ideas other than changing all the file names to not include them (not really an option)?

    Thanks,
    Jim

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    It's difficult to tell without seeing your code. Did you tried to put the file names between brackets?

    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •