473,382 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

import txt file not creating new lines

I'm importing a text file and would prefer that it create a new row in
the access table for each row in the text file. However, it is
sporadically combing some of the lines into a single row.

eg.
row 1: &a4758v5976HDNOC

row 2: &a4758v7128H 14

row 3: &a4880v432H492733

row 4: &a4880v936H0035-D
&a4880v15125
&a4880v3312HINWC5066

row 5: &a4880v3888H501
I'm not using specs or anything, just a standard fixed-width import -
Access 97. Anyone have a solution for this? Thanks.

Nov 13 '05 #1
5 2768
The first question is what creates this file? It looks like you may have
control characters that indicate end-of-lines or not. You may have to either
strip out these control characters or read character by character looking
for the right CrLf combination to put into a table.

Scott

<rd*****@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I'm importing a text file and would prefer that it create a new row in
the access table for each row in the text file. However, it is
sporadically combing some of the lines into a single row.

eg.
row 1: &a4758v5976HDNOC

row 2: &a4758v7128H 14

row 3: &a4880v432H492733

row 4: &a4880v936H0035-D
&a4880v15125
&a4880v3312HINWC5066

row 5: &a4880v3888H501
I'm not using specs or anything, just a standard fixed-width import -
Access 97. Anyone have a solution for this? Thanks.
Nov 13 '05 #2
The file is created by a process that I do not have access to modify.
However, when I parse the file and import only the problematic lines,
they work correctly, each filing into its own row. Is access getting
sloppy in its handling?

If I can't fix this, does anyone have a script to read rows with
multiple lines of data and separate them into their own rows?
Scott Simonson wrote:
The first question is what creates this file? It looks like you may have control characters that indicate end-of-lines or not. You may have to either strip out these control characters or read character by character looking for the right CrLf combination to put into a table.

Scott


Nov 13 '05 #3
Tried it in Access XP - no problems. I suppose this is a 97 bug.

Nov 13 '05 #4
Tried it in Access XP - no problems. I suppose this is a 97 bug.

Nov 13 '05 #5
How are you importing the file? Are you automating this import? Are you
using the TransferText command?

You said that you are importing the bad lines, what for? Your data doesn't
look like fixed width, but if you are just trying to import into a single
field then I understand what you're doing there.

What version are you going to use? I prefer A2k but the help files stink on
it.

Scott

<rd*****@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
The file is created by a process that I do not have access to modify.
However, when I parse the file and import only the problematic lines,
they work correctly, each filing into its own row. Is access getting
sloppy in its handling?

If I can't fix this, does anyone have a script to read rows with
multiple lines of data and separate them into their own rows?
Scott Simonson wrote:
The first question is what creates this file? It looks like you may

have
control characters that indicate end-of-lines or not. You may have to

either
strip out these control characters or read character by character

looking
for the right CrLf combination to put into a table.

Scott

Nov 13 '05 #6

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

Similar topics

4
by: news | last post by:
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as...
2
by: David Berry | last post by:
Hi All. I'm looking for any help or sample code that can show me how to make a file import wizard in ASP.NET (VB preferred) like the one that MS Access uses. I'm working on a web site where the...
1
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...
5
by: Johnny Meredith | last post by:
I have seven huge fixed width text file that I need to import to Access. They contain headers, subtotals, etc. that are not needed. There is also some corrupt data that we know about and can...
3
by: Chris | last post by:
Hi, 1) In file test.aspx, i put: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> <%@ import namespace="System.Data"%> <%@ import...
1
by: NathanB | last post by:
Hi there, I have a text file (flat file) which I would like to import on a regular basis into Access. The text file contains 2 record types, header (prefixed with RHD) and detail (prefixed with...
1
by: Supersonic | last post by:
I’m a dba for a SQL and I’m trying to learn how to import data from a simple text file. The text file looks like "1, name" "2, name2" and so on. How is it possible to solve this import with python?...
1
by: Wandering | last post by:
I know you guys are heavy duty coders, while I do ad-hoc analysis, and rarely write code. And, I may be in the wrong groups because this is about an install issue, and I don't think it's a code...
6
by: EricR | last post by:
I am trying to bcp import a text file into a SQL Server 2000 database. The text file is coming out of a java application where order information is written to the text file. Each record is on it's...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.