473,809 Members | 2,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading Tab Delimited Data With Imbedded Double Quotes

Tom
I can't get the Microsoft Jet OLEDB 4.0 driver to read a tab delimited
text file that has double quotes imbedded in the data. For example

Field1 | Field2 | Field3
Bob | Pant Size 34" Waist | 22

(I'm using a vertical bar here for the tab)

Field2 will contain: Pant Size 34
Field3 will contain: Waist

I have a schema.ini

[MyFile.txt]
ColNameHeader=T rue
Format=TabDelim ited
MaxScanRows=25
CharacterSet=OE M

How do I get it to read the double quote?

Tom
Nov 21 '05 #1
1 7917
Tom
I figured it out. I wanted a way to tell the OLEDB Jet 4.0 driver to
ignore the double quote as a text delimiter. There is nothing like that
on MSDN. After 8 hours of Google newsgroup searching I found one post
that referred to a MS article that tells how.

http://support.microsoft.com/default...b;EN-US;205439

In the schema.ini file add

TextDelimiter='

where the ' is what ever character you would like it to be. In my case
the data was coming from a mainframe where they can't type some PC
characters like the ^. I used that as the text delimiter since it will
never appear in my file.

Another solution was to change all occurrences of " into "". That will
cause the driver to pass it on as data rather than try to start a text
delimit scan.

Tom
Tom wrote:
I can't get the Microsoft Jet OLEDB 4.0 driver to read a tab delimited
text file that has double quotes imbedded in the data. For example

Field1 | Field2 | Field3
Bob | Pant Size 34" Waist | 22

(I'm using a vertical bar here for the tab)

Field2 will contain: Pant Size 34
Field3 will contain: Waist

I have a schema.ini

[MyFile.txt]
ColNameHeader=T rue
Format=TabDelim ited
MaxScanRows=25
CharacterSet=OE M

How do I get it to read the double quote?

Tom

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2541
by: melih.onvural | last post by:
Group, I want to get into a remote server, tail a file, and see if the last line is an error or not. I think that I've figured out how to shell over and tail the file. I have the specific server information and filename/location all stored in a database. I can't figure out how to get the result of the tail into a variable so that I can search it for an ERROR string. Any ideas? thanks in advance,
4
1784
by: Ron McCafferty | last post by:
How do you read comma delimited data from programs such as Excel where the data itself contains dounble quotes and commas. It used to be you could just use input. How is it fone now? The data below contains output from Access saved as a CSV. line 1,"normal data","a double quote "" here" line 2,"a comma , here ","more normal data" Input's help documents the "" will not work.
1
9758
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no control. It outputs all text fields surrounded by quotes, and all numeric fields w/o quotes. All fields are separated with commas. This has been working for 2 years, until today, when one of the data fields
5
2724
by: Yama | last post by:
Hi, I am looking to create a report comma delimited on a click of a button. Explanantion: 1. Get from the database: "SELECT * FROM Customers WHERE Region = 'CA'" 2. Use either DataReader or DataSource 3. Create a button "Export" 4. On ServerClick Event prompt user to save as a text comma delimited file.
7
1983
by: GregoryD | last post by:
I have a flat file that I'm trying to stick into a MySQL database. One record per line, multiple fields per record, and many of them are null fields which are just double quotes without a space between. It's probably nothing really major for people who have done this before, but I'm a bit stumped. The file is comma delimited. Every field is surrounded by double quotes. I've done quite a bit of searching, on the php site and elsewhere,...
0
1684
by: Masa Ito | last post by:
I have pipe delimited (and comma/tab) files that I read with JET using a schema file. Occasionally a field has multiple quotes (") inside a single field - which chokes the line (the rest of the columns get read as nulls). An example of an offending line is: J" Invalid " .... This is a text field that is between the two 'pipes' so I need it read exactly as is. I have reverted to schema files, trying everything I can to overcome this...
15
9562
by: VMI | last post by:
I'm parsing a comma-delimited record but I want it to do something if some of the string is between "". How can I do this? With the Excel import it does it correct. I'm using String.Split(). Basically, this is what I want to do: Use string.Split() on the whole string UNLESS the string is in between double-quotes. The part of the string in-between the "" will be ignored by String.Split Thanks.
4
5070
by: tshad | last post by:
I have a program that is reading a .csv file into a dataset and works fine except that it is dropping the first line. I assume that is because it is dropping the header. The problem is the first line is not a header. This was working before and I am not sure what caused it not to work. I am using OleDbDataAdapter. Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ path & ";Extended...
1
7253
by: silpa | last post by:
I have a comma delimited text file which has data like this. 1, 11, "abc" ,False 2, 12, "def" ,False 3, 13, "ghi" ,False 4, 14, "jkl" ,False The name of this file is somedata.txt. Only one column has double quotes. i.e., "abc" "def" etc. I want to store these values into a table named temp in SQL Server.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.