473,587 Members | 2,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text File Export Issue

Jay
This is a strange one that I can't seem to find a fix for.
We have a Billing DB application (Access 2000 format) where we upload
billing info in a comma delimited text file to our printer who prints and
mails our bills. The application basically creates a table then exports a
comma delimited file of that table.
The problem is that we keep getting one seemingly random record in the text
file that is misaligned. The record in question is truncated on one line
then repeated correctly on the next line. This of course throws off our
printers automation (printing presses seize up, paper flies and ink
splatters).

When looking at the original table, there is no hint of a problem. Also, the
table is a temp table and gets deleted and recreated each time we do this
process. The number of records is between 5000 to 12000 and again, only one
at random screws up in the exported text file. Any ideas?
Thanks,
Jay
Nov 13 '05 #1
4 2054
Jay wrote:
This is a strange one that I can't seem to find a fix for.
We have a Billing DB application (Access 2000 format) where we upload
billing info in a comma delimited text file to our printer who prints and
mails our bills. The application basically creates a table then exports a
comma delimited file of that table.
The problem is that we keep getting one seemingly random record in the text
file that is misaligned. The record in question is truncated on one line
then repeated correctly on the next line. This of course throws off our
printers automation (printing presses seize up, paper flies and ink
splatters).

When looking at the original table, there is no hint of a problem. Also, the
table is a temp table and gets deleted and recreated each time we do this
process. The number of records is between 5000 to 12000 and again, only one
at random screws up in the exported text file. Any ideas?
Thanks,
Jay


If you were to run this process for the same recordset would the same
record be messed up? IOW, it may change each month, but if you were to
run it once, find the bad line, then reran the process would the same
record be incorrect?

ALso, since it appears this happens each month, does it go flakey on the
same field? IOW, let's say if flaked out on the address field, did it
flake out on the address field last month?

If you can't get a solution, the best suggestion would be to scrap your
export process if using Docmd.TransferT ext and write a routine to do it.
See Open, Close, Write, Print, Put in help. At least if a problem
occurs with a routine you write you can find the problem easily enough.
Nov 13 '05 #2
Jay
If I run the process again and/or re-export the same table I get the same
problem with the same record. If I run it again in another month, I get the
same problem but with a different record.

May 04 Output
"616-0601","4251-e04","*4251-e04*","NEW ENGLAND GOLF ASSOC.","300 ARNOLD
PALMER BLVD.",,"NORTON
NORTON","MA","0 2766-1365","American Publishing Service","PO Box
4560","Edwards" ,"CO","81632"," 800-330-8966","Golf
World","R12b2", $79.94,$39.97,2 ,92,6/11/2004 0:00:00,"71%"

Sept 04 Output
"1211-R03","19148-i04","*19148-i04*","LINDA MUIRCOMMANDER N
LINDA MUIR","60 DEER LA",,"GUILFORD" ,"CT","06437216 9","National Magazine
Service","PO Box
7570","Avon","C O","81620"," 800-330-8966","Flying", "R9b2",$52.00,$ 26.00,2,24,
10/2/2004 0:00:00,"46%"

So I see two different problems. The May 04 output truncated after the city
field and the Sept 04 output truncated after the name field then repeats the
name (albiet incomplete) on the next line.
What is interesting is that I can retype the info over the existing record
and I get the same error. I'll look into a routine as we are using the
transfet text command.
Jay
"Salad" <oi*@vinegar.co m> wrote in message
news:lE******** *********@newsr ead3.news.pas.e arthlink.net...
Jay wrote:
This is a strange one that I can't seem to find a fix for.
We have a Billing DB application (Access 2000 format) where we upload
billing info in a comma delimited text file to our printer who prints and mails our bills. The application basically creates a table then exports a comma delimited file of that table.
The problem is that we keep getting one seemingly random record in the text file that is misaligned. The record in question is truncated on one line
then repeated correctly on the next line. This of course throws off our
printers automation (printing presses seize up, paper flies and ink
splatters).

When looking at the original table, there is no hint of a problem. Also, the table is a temp table and gets deleted and recreated each time we do this process. The number of records is between 5000 to 12000 and again, only one at random screws up in the exported text file. Any ideas?
Thanks,
Jay


If you were to run this process for the same recordset would the same
record be messed up? IOW, it may change each month, but if you were to
run it once, find the bad line, then reran the process would the same
record be incorrect?

ALso, since it appears this happens each month, does it go flakey on the
same field? IOW, let's say if flaked out on the address field, did it
flake out on the address field last month?

If you can't get a solution, the best suggestion would be to scrap your
export process if using Docmd.TransferT ext and write a routine to do it.
See Open, Close, Write, Print, Put in help. At least if a problem
occurs with a routine you write you can find the problem easily enough.

Nov 13 '05 #3
Jay wrote:
If I run the process again and/or re-export the same table I get the same
problem with the same record. If I run it again in another month, I get the
same problem but with a different record.

May 04 Output
"616-0601","4251-e04","*4251-e04*","NEW ENGLAND GOLF ASSOC.","300 ARNOLD
PALMER BLVD.",,"NORTON
NORTON","MA","0 2766-1365","American Publishing Service","PO Box
4560","Edwards" ,"CO","81632"," 800-330-8966","Golf
World","R12b2", $79.94,$39.97,2 ,92,6/11/2004 0:00:00,"71%"

Sept 04 Output
"1211-R03","19148-i04","*19148-i04*","LINDA MUIRCOMMANDER N
LINDA MUIR","60 DEER LA",,"GUILFORD" ,"CT","06437216 9","National Magazine
Service","PO Box
7570","Avon","C O","81620"," 800-330-8966","Flying", "R9b2",$52.00,$ 26.00,2,24,
10/2/2004 0:00:00,"46%"

So I see two different problems. The May 04 output truncated after the city
field and the Sept 04 output truncated after the name field then repeats the
name (albiet incomplete) on the next line.
What is interesting is that I can retype the info over the existing record
and I get the same error. I'll look into a routine as we are using the
transfet text command.
Jay


There is one other thing you could check for. Go to a record that has a
problem. On the OnCurrent event, call a proc like the following.
CheckChars Me.Address

Private Sub CheckChars(var As Variant)
If Not IsNull(var)
Dim intI As Integer
Dim blnBad As Boolean
For intI = 1 to Len(var)
If ASC(Mid(var,int I,1)) < 32 or ASC(Mid(var,int I,1)) > 126 then
blnBad = True
Exit Form
Next intI
If blnBad then Msgbox "You have a character not alphanumeric"
Else
msgbox "The value is null."
Endif
ENd Sub

What this routine does it it reads every characters in the string the
field you passed. It's possible that a character that is not
alphanumeric is contained inside the field and does not display. IOW,
some data that "looks" correct in a field may contain a character that
Access does not know how to handle in the export process.

If you know how to program, you could open a recordset on the records
that were bad in May and Sept and pass the value to the above sub and
see if there is something that is outside of the scope of Ascii alphas.
Nov 13 '05 #4
Jay
Good thinking, I'll give this a shot.
Jay
"Salad" <oi*@vinegar.co m> wrote in message
news:RP******** ******@newsread 3.news.pas.eart hlink.net...
Jay wrote:
If I run the process again and/or re-export the same table I get the same problem with the same record. If I run it again in another month, I get the same problem but with a different record.

May 04 Output
"616-0601","4251-e04","*4251-e04*","NEW ENGLAND GOLF ASSOC.","300 ARNOLD
PALMER BLVD.",,"NORTON
NORTON","MA","0 2766-1365","American Publishing Service","PO Box
4560","Edwards" ,"CO","81632"," 800-330-8966","Golf
World","R12b2", $79.94,$39.97,2 ,92,6/11/2004 0:00:00,"71%"

Sept 04 Output
"1211-R03","19148-i04","*19148-i04*","LINDA MUIRCOMMANDER N
LINDA MUIR","60 DEER LA",,"GUILFORD" ,"CT","06437216 9","National Magazine
Service","PO Box
7570","Avon","C O","81620"," 800-330-8966","Flying", "R9b2",$52.00,$ 26.00,2,24, 10/2/2004 0:00:00,"46%"

So I see two different problems. The May 04 output truncated after the city field and the Sept 04 output truncated after the name field then repeats the name (albiet incomplete) on the next line.
What is interesting is that I can retype the info over the existing record and I get the same error. I'll look into a routine as we are using the
transfet text command.
Jay


There is one other thing you could check for. Go to a record that has a
problem. On the OnCurrent event, call a proc like the following.
CheckChars Me.Address

Private Sub CheckChars(var As Variant)
If Not IsNull(var)
Dim intI As Integer
Dim blnBad As Boolean
For intI = 1 to Len(var)
If ASC(Mid(var,int I,1)) < 32 or ASC(Mid(var,int I,1)) > 126 then
blnBad = True
Exit Form
Next intI
If blnBad then Msgbox "You have a character not alphanumeric"
Else
msgbox "The value is null."
Endif
ENd Sub

What this routine does it it reads every characters in the string the
field you passed. It's possible that a character that is not
alphanumeric is contained inside the field and does not display. IOW,
some data that "looks" correct in a field may contain a character that
Access does not know how to handle in the export process.

If you know how to program, you could open a recordset on the records
that were bad in May and Sept and pass the value to the above sub and
see if there is something that is outside of the scope of Ascii alphas.

Nov 13 '05 #5

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

Similar topics

4
12690
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 though the file may be too big! When I try to do it via command line: mysql -u root --host=localhost printing < ./printing.txt It eventually...
1
2323
by: imw8n4u | last post by:
I have an export specification created to export the result of a query to a text file. My issue is that it is adding decimal places to my numbers (For instance, 1 becomes 1.00). Does anyone know how to prevent this from happening? Thanks!
1
1913
by: Steve G | last post by:
Hi, I am having the following issue: I have a report which I use to create an ASCII file. Its not necessary to print the report since its going to a file for on screen view only. The problem is there is no way to get around the page setup which requires a printer and margins for the report. When I export with "output to..." text, there are...
7
1683
by: Ramon Pam | last post by:
I need create a macro for export to only one text file, of 3 TABLES What is the necessary instructions (for create ONLY ONE FINAL text file) ?? Thanks Ramon
1
2676
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 issue. But ... Office 2000 was on this machine when it was given to me. I don't own it. After installing Office 97, mine, in a different directory,...
9
7689
by: NEWSGROUPS | last post by:
I have data in a table in an Access 2000 database that needs to be exported to a formatted text file. For instance, the first field is an account number that is formatted in the table as text and is 8 characters long. This field needs to be exported as pic(15) padded in the front with 0's (zeros). The next field an ID name that is 15...
3
10940
by: Wayne | last post by:
I'm trying to automate the export of a query to a text file using code. If I export the query manually I get the exact result that I want i.e. If I select the query then choose File/Export from the menu bar, choose "Text" as the save format, and then select "fixed width" as the export format, I end up with a fixed width text file with no...
3
3137
by: Chris McFarling | last post by:
What's the most efficient method to export the result set of a SQL query to a text file using ASP.NET? There could potentially be a few thousand rows.
8
18763
by: iheartvba | last post by:
Hi I am using Access 2007 and am trying to export a query to a fixed length text file. I tried using the following code to export the text file: DoCmd.TransferText acExportFixed, , "qryFFRDeFile", "C:\qryFFRDeFile.txt", True Access asks for a specification name, now here lies the challenge, how do I create an export specification I have...
0
7843
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...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
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...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.