Is there code to export to standard fixed length text file?

I can do this manually but it's more than a couple clicks.

I'd like to automate this from the MDB that I can call from my C#
process call or an OLE call.

Thanks much!

3/22/2006 9:07:06 PM
access.conversion 3038 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 13

AFAIK the choices are:

1) write code in your C# application that opens a recordset, assembles
the fixed-length records and writes them to a text file.

2) use the Jet Text ISAM to write the file, either by automating Access
or by writing to the DAO library. Either way you'll need to provide a
schema for the text file. The options are an Access import/export
specification stored in the mdb file, or a schema.ini file in the
destination folder. 

The import/export spec is easy to create: start expoirting the data
manually, click the Advanced button in the wizard... but can only be
used with DoCmd.TransferText (i.e. requires you to automate Access
instead of just using DAO). Schema.ini is a bit more obscure, but is
simpler to create on the fly under program control. Because it's
recognised by the Jet Text ISAM, you can just use DAO instead of
automating Access. 

Create a Schema.ini file based on an existing table in your database:;EN-US;155512
How to Use Schema.ini for Accessing Text Data;EN-US;149090

Documentation for Schema.ini is towards the end of the Help topic
"Initializing the Text Data Source Driver" (under Microsoft Jet SQL

On 22 Mar 2006 13:07:06 -0800, "megalomaniac"
<> wrote:

>I can do this manually but it's more than a couple clicks.
>I'd like to automate this from the MDB that I can call from my C#
>process call or an OLE call.
>Thanks much!

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

3/23/2006 6:26:18 AM
DOH!!!! (Head smacker!)

Wow, VS 2005 has a native ole db Jet driver to Access... Will the
miracles never cease...

I don't know why I try to stay away from ODBC or other type drivers
like they were plegue ridden and therefore never consider them, but I
really appreciated you input.

I'm rolling big time now...

Many thanks even if it was so simple and easy it was glaring at me in
the first place ;-)

3/25/2006 4:25:36 PM

Similar Artilces:

Re: merging a pub file into a pub document?
GbH wrote: > I'm sure I've seen this somewhere in here or a similar newsgroup. > Someone clever has written a script that will import a publisher > document into an existing/open publisher document. > Please can somebody point me at it. > > -- Also why did my post seem to disappear off the server before I could read it? -- -- Wisdom and experience come with age, they say, but I wish I could remember the darn question Both of your posts show -- Don Vancouver, USA up here. "GbH" <Geoff_Hannington@IEE.ORGasm> wrote in message news:u7JmyS0d...

Integrate Paycodes, benefit codes and deduction codes
Has anyone used integration manager to update new pay rates, deduction amounts and benefit amounts for employees? At the beginning of each year, our company gives pay increases and we need to update the pay codes, deduction codes and benefit codes for 40 employees, which we get the information from a spreadsheet. I thought that maybe I could use integration manager to update the pay, benefit and deduction codes instead of going into each employee's card, which is time consuming. Thanks, Laura Integration Manager will allow you to do this. Use the Payroll Master Destination. one ...

Can't delete file
I just did a system recovery on a Gateway with XP Pro from the restore partition on the hard drive. One of the restore options was to save the old windows files in a folder called Backup (date). So I did that. After restoring the OS I copied all the files I needed back into the new install from the backup folder. Then I wanted to delete the backup folder. Everything deleted OK except... C:\Backup\Windows\System32\Macromedia\Flash\flash8a.ocx No way in hell can I get it deleted. "access denied". I booted into Safe Mode where I could get to the security options and no mat...

zip codes don't merge #2
I am trying to mail merge w/ Word 2000 the names and addresses in my worksheet. When I get to the part to choose the format for the mailing labels, I choose F1, F2, etc. to F6 (which is the zip code column). A few do get there, but the vast majority stop at the state, leaving off the entire zip code. I have gone to menu/format and selected text in the number tab. I have gone to format/cells and chosen special/zip code in the number tab. I've read Excel for Dummies. Please help me. TIA bb ...

Mulit-Part Email with Text, but no HTML Content
Hi there, We've been getting a few emails from AOL clients where the message appears blank in Outlook 2000. If we take the message, do a save as Message Format, then open it in notepad, the text portion of the email is intact, but the HTML version just has the header tags and nothing else. Is there any way to get Outlook to show the message contents without having to do this work around? Could somebody identify what the issue is with the mail formatting from the AOL client that causes this to happen? Thanks, Lindsay. ...

Any way to get around the 240-character line limit on text output?
I'm trying to save an Excel file into a fixed-length file for import into a mainframe and the biggest problem (as pointed out in another post on this board) is that there is a limit of 240 characters per line. This causes the rest of each line to be placed at the end of the file. My record layout length is around 300 and we're talking about 50,000 records. How can I get around the 240 character limit to save this file in an acceptable format? Otherwise it will take hours of work to get the file in the proper format.;en-us;13155...

concatenating two vendor codes
My company recently changed the vendor codes and now I end up with two separate sets of data for each vendor. Obviously I could just leave the vendor code field out. I don't want to do that so what I need to do is concatenate the two codes. Example Vendor Code Vendor Name 123 Joe's Supplies ABC Joe's Supplies what I need is this Vendor Code Vendor Name 123/ABC Joe's Supplies any ideas? Rather than create a new record for each vendor, add another field to the table -- call it NewVendorCode -- and put th...

How do i export a pivot chart as a static chart object?
I am trying to paste a pivot charts into Word. I am using pivot charts to create several charts of the same type from a block of data. Unfortunately when I pivot the chart, the pasted version in Word also changes, thereby making all the charts I am pasting change to be the same one as the currently pivoted one. I want the paste to be the Office Graphic Object rather than a picture file as I prefer the look and scalability of the graphic object. Is there any way to remove the link to the source Excel file when pasted into Word but retain the chart format? I am using Office 2007. Hi, As...

Rich Text not displaying formater
This is a multi-part message in MIME format. ------=_NextPart_000_00EB_01CAB4CC.3211DD00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have a Rich Text box that is not displaying the format. I can click ctl-B and ctl-U and the text will bold and underline but I cannot get the format painter to display. The text box is in a subform if that matters. ------=_NextPart_000_00EB_01CAB4CC.3211DD00 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD...

Can MS EXCEL remove duplicates and separate by color coded items ?
Can MS EXCEL remove duplicates and separate by color coded items ? I am NOT technical and have just started using MS EXCEL. Can anyone PLEASE HELP me: 1. How can I automatically remove duplicates using EXCEL ? ie the same info input more than once on different lines. Can EXCEL do this ? 2, I have color coded the text in the certain lines in terms of priority. can Excel rearrange the data by color ? If yes, How do I do it ? I think I have EXCEL '97 Thanks for your help in advance. Hi 1. You can extract the unique items to a new list using menu Data > Filter > Advanced fil...

Trying to convert uppercase to lowercase text
Can someone help me? I am trying to convert uppercase text to Sentence case. I have seen the "proper" commnd but it doesn't seem to work. I must be doing something wrong. I am on Excell 97. Thanks. Joe, here is a macro that will do it -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 97 & 2000 ** remove news from my email address to reply by email ** "Joe B" <> wrote in message news:01c501c...

16 bit code
Hello, I have a 16 bit code to maintain. (It is too complex to copile it to 32 bit) so all we are doing is support. Now they want to add a small feature, where I need to copy long file names in the project. I know we can not do long file name copies in vc++ (1.52). So I wrote a program in VC++(6.0) which does directory copy. My questions are 1. How can I call a 32 bit exe (I guess WinExec should work)? 2. How can I make the 16 bit to wait till the 32 bit code completes? 3. Is there any other better way to do this? (other than converting to 32 bit) Thanks. I actually do this in an old 16-bi...

Any send / receive email message is in Text mode Only
Hello, I have an issue that I have been unable to resolve. I have Microsoft Outlook 2002 (with Service Pack 3)and any message that I send and for the most part any message that I receive are in Text Mode Only even so I have configure Outlook 2002 to send new emails in Rich Text (I also try HTML but it doesn't make any difference). BTW, I have installed every Microsoft XP critical patch and every update for Microsoft Outlook 2002, I have even look in the knowledge base but I can resolve this issue. Finally, I would appreciate some advice as to how can I resolve this issue and I t...

from "date" to "text"
Hi there, I have cells formatted as date (e.g. 11/9/03) and I'd like to change the format to text. But when I do it, the values change as well (e.g. "36472"). What can I do to avoid this? Thanks You can't. Dates, to Excel, are the number of days since Jan 1, 1900. That's the what you are seeing when you try to change the format to text. You need to tell us why you want it as text. You have lots of other choices of formats available. If you absolutely have to have text, you will need to create a helper cell, and use a formula like: =text(a1,"m/d...

area codes is auto filling my own 9 digit ph# vs just area code
When I enter a phone number for a contact it autofills with my personal area code and phone number instead of just the area code. How to I change this to just autofil the area code? I am using Outlook 2007 on an ACER laptop. Make sure you have your area code entered correctly in "Dialing Properties". "Computer Dummy" wrote: > When I enter a phone number for a contact it autofills with my personal area > code and phone number instead of just the area code. How to I change this to > just autofil the area code? I am using Outlook 2007 on an ACER ...

Access file types?
I have created an Access database and have designed a form. When selecting "Form View" the forms remains in design view. I then get a new database which is an LDP file which I cannot delete and restricts using the mdp file. Why can I not view the designed form in Form View? It's LDB, not LDP; and MDB, nor MDP The LDB file is a locking database. It cannot be deleted while the main database is open. -- Arvin Meyer, MCP, MVP "Wayne Viles" <WayneViles@discussions...

VBA Code for Pasting Sheets
I would like a spreadhseet that pastes the contents of one sheet into another sheet. I like like to do this for 7 different sheets For example: I would like paste the contents form sheet titled "sheet1" into a sheet titled "data1". Continue to process for pasting "sheet2" into "data2" and "sheet3" into "data3" all way until "sheet7" and "data7". thanks, Curt Subject: Automated Copy Paste Subject: Copy/Paste Import/Export Data VBA Code On Apr 27, 10:49=A0am, Curt <C...@discussions.mi...

how to divide all values with a fixed value ?
how can i divide all values in one data column in a pivottable with the same data value in another column in the same pivot table ? how do you specify the reference in the calculated field so it always takes the same 1 value ? this is very urgent. thanks in advance. -- fax ------------------------------------------------------------------------ fax's Profile: View this thread: I think what you're looking for is an Absolute Reference. So, let's say yo...

MC/VISA joint code
Isn't there any way to combine the blocks (4* & 5*) for MC/VISA credit cards? It's a pain to have them separate because my bank posts them together. It is the same company afterall. It would save me a lot of time adding separate entries together to reconcile the statement! I do not know of a way to do what you are asking, but I have found that using the # symbol as follows works better than using the * symbol: 4############### 5############### If you use the * symbol it is a wild card with no determined length. The # symbol requires that the characters after the first d...

Money 2004 - Experian Offer
I just loaded Money 2004 Deluxe and converted my 2003 files with no problem. I decided to give the free year of credit monitoring from Experian a try but after filling everything out I get an error that the provided code has expired. I neither had nor provided any code for this offer, I only used the link from Money 2004. Now Experian was more than willing to set up a $79 account if I wanted to proceed. Any solution out there? I have the same problem... I am looking for a FREE way to contact Microsoft about this problem. >-----Original Message----- >I just loaded Money 2004 ...

set y-axis length on chart imported from excel
With PowerPoint 2007, in 2003 Compatibility mode I've inherited a file with two slides with similar simple 2-d column charts that apparently were imported somehow from Excel (I assume this because when I create fresh charts the tools are completely different). With both, the object that contains the chart is sized 5.16h x 8.5w. on chart A, the y-axis scale is 0-5000, on B it's 0-4000, with major units at 1,000 for each. With A, the actual length of the y-axis is, let's say, 5". With B, it's 4". I want the actual length of the two axes to be the same. If...

config file 07-23-07
I'm creating an application in Access 2003 using VBA, JET, ADO. I'm fairly new to this world. I come from a php background. There is some data that will rarely if ever change. For example, a list of province names and two letter codes. I need to use this list in several different places in the application. Sometimes, I may need to get the name from the code. Sometimes I may need to populate a combo box. I have several static lists like this. What is the best way to store this data? Global variables, tables, files? I will also need to store the location of the backend file. I'm t...

Exchange / Outlook 2003 How to lock the position of text and emails within an email?
We run Exchange and Outlook 2003 on a Windows 2003 domain. One of our users wants to create an email mailshot for 'prestige' persons, and therefore wants to lock the formatting. She has noticed that with most emails, the position of the text and graphics will modify according to how big the email window is, or if it is in the preview pane e.g. say there there is a graphic at the top and a large amount of text below it, if you have the email open in a small Window it will try and automatically reduce the amount of words per line, so you don't see half a sentence (the rest of the sen...

Fixed Asset posting setup
Is there a posting setup window for Fixed Assets similar to Tools>Setup>Posting>Posting: Posting Setup? Thanks for your help - John Try Tools >> Setup >> Fixed Assets >> Company >> Require Account Expansion button. hth Rheiner "J Purdy" wrote: > Is there a posting setup window for Fixed Assets similar to > Tools>Setup>Posting>Posting: Posting Setup? > > Thanks for your help - John Thanks for that info. I'll pass it along to our accounting people. "Rheiner" wrote: > Try Tools >&...

Bug in Exporting Recurring Appointment from Outlook 2007?
When a recurring event is manually moved from Day 1 to Day 2, where Day 1 fits the recurrence pattern and Day 2 doesn't, the exported data doesn't pick up on this exception, so the exported data not matching what is displayed in the Outlook calendar view. The export process used is "File/Import-Export...", to Excel 2007. What are you trying to export to Excel - the moved meeting or the original? The moved meeting is no longer a part of the recurrence (if I recall correctly, you are warned when you move the meeting that the link will be broken). It is expec...