Solved

ODBC text driver

Posted on 2002-05-16
3
347 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 62
Add and format columns in vb6 7 55
VB6 ListBox Question 4 42
Advice in Xamarin 21 78
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…

816 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

14 Experts available now in Live!

Get 1:1 Help Now