Solved

ODBC text driver

Posted on 2002-05-16
3
345 Views
Last Modified: 2010-08-05
I am currently using Microsoft text driver in VB code to read from a tab, comma delimeted sytle file. This works OK until some entries contain double quotes in which case it strips everything after the quotes. In the default on the PC I am testing the defaults are as follows:
File Type: ANSI
Row delimiter: {CR}{LF}
Text qualifier: Double quote{"}
I have tried using the schema.ini file also but there is still a problem so I need to use the ODBC text drivers. Any sample of code on how to do this would be helpful.
Thanks.
0
Comment
Question by:bcc
  • 2
3 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7014259
That's was a problem to me to too. If you could access the files before processing, open each on with open statement, save the contents to a variable, replace every instance of double quotes (with Replace funtion) and open the file for output and write back the content of variable to file.
0
 

Author Comment

by:bcc
ID: 7014726
Thanks Richie but that's not really a solution to my problem, is it? If you have already worked out a way to do this I would like to know it please.
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 7014740
I can access the files before processing, if you cannot do it my advise doesn't help you. I did it in the way i have commented out.
Sorry.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

760 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

18 Experts available now in Live!

Get 1:1 Help Now