Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 24th, 2006, 06:53 PM
Registered User
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RogerNoob
Default Reading a custom delimited file

Well, my problem is that when reading the file it doesn't recognize all the columns it should.

I'm using ODBC for text.

The data inside the file is delimited with |, the first line of the file is:

---1st scenario---
2005|01|Book of "Roses" |Adam Benson |46

the fields are year,month,book,name,age.
But when I read the file only 3 columns are recognized.

|Book of "Roses" |
is truncated to
Book of

---2nd scenario---
2005|01|Children |Roger Grand |52
2005|01|Book of "Roses" |Adam Benson |46

the fields are year,month,book,name,age.
When I read the file 5 columns are recognized

But when I read the information from the second line.
the third field gets truncated to
Book of
And the 4th and 5th fields are DBNull.

I've already read the posts:


Here indicates the conneciton string and the schema.ini files, and:


Inside here they tells how to get the Schema.ini file through ODBC Sources inside Administrative tools wich for the 1st scenario it only detects 3 columns and not the 5.

Please I'm really going crazy with this.

Futher findings:

I've found that instead of 1 " there are 2 " in that specific lines, everyuthing works fine.
Then I supposed I should change every " into "", but what would happen if in my File there is this line:

2005|01|"Children" |Roger Grand |52
2005|01|Book of "Roses" |Adam Benson |46

And changing the " into "" the result would be:

2005|01|""Children"" |Roger Grand |52
2005|01|Book of ""Roses"" |Adam Benson |46

The 3rd value of the 1st is empty or null, i'm not sure
It would be incorrect.

And the 3rd value of the 2nd line would be:
Book of "Roses"
It would be correct....

I think i'm getting clouse to the solution but I still can't get it right but then something happens.... :(

When opening the file with Excels it works fine, using the delimiter | with this line
2005|01|Book of "Roses" |Adam Benson |46

Similar Threads
Thread Thread Starter Forum Replies Last Post
Write Tab-delimited text file VikramMullick Pro VB.NET 2002/2003 1 May 5th, 2006 11:18 AM
pipe delimited file to SQL using DTS juvesaurabh SQL Server DTS 1 February 16th, 2006 12:56 AM
Comma delimited file to Excel Sheet vinod_yadav1919 VB How-To 0 August 5th, 2005 10:09 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.