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] 7

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:

Photograph Inserted from File Problem
Running Excel 2000 - When I insert a jpeg or bmp photo into a sheet and then try to save th file, I get "Document Not Saved". Probably been asked and answered a thousand times, but what's going o & how do I fix it -- Message posted from ...

generate .NET code from visio 2003
Hi ! How can i Generate .NET code from a UML made in visio 2003 ? I did searh the net and found this link but it says 404 ? the article title is Generating .NET Code Using Visio Enterprise Architect's UML So any one know how do that or any one have back up copy of this article Thanks which version of v2003 are you using. The EA version which comes with I believe has the process in the help facility. v2003 pro does not support forward engineering of uml... Al "Suhail Kaleem" <>...

*Selective* restore using Files and Settings Transfer?
Before reinstalling XP from scratch on my seriously messed up system, I ran the Files and Settings Transfer wizard, but I haven't yet tried restring anything. The files I backed up separately anyway. I have reinstalled the programs I want to use now -- with the exception of the free-for-personal-use SecureZip Express that was made available a couple of years ago. When I try to reinstall it and it "calls home," it refuses to authenticate. PKWare's response to my tech support request is to say that the free version is no longer available and that I could get th...

Import/Export XML in protected worksheet
I developped an excel tool on which most of the cells are protected (and I need to keep them protected). I mapped an XML schema on all the worksheet entries. I would like to be able to import and export all these entries but Excel does not let me do that when the worksheet is protected. Can anybody help? ...

text boxes
Hi all, I have a textbox within a userform that displays a value. I don't want any users to be able to edit this information. How do I go about this? Thanks in advance Dawna Set the "enabled" property to false. "Dawna" <> wrote in message > Hi all, > > I have a textbox within a userform that displays a value. I don't want any > users to be able to edit this information. How do I go about this? > > Thanks in advance > Dawna ...

VB code help please
I am trying to write a VB code for running a appending query then a deleting query after they are run to close the form I am on. That would be a submit button on this form. Then I need one that would just run the deleting query and the close the form. If there is anyone out there that knows the code for this that would be so much help thank you. I would also though when I do run the appending query and deleting query it not to ask me if I am sure that I want to run the appending or deleting message but are u sure you want to submit these parts. wrote: > I am try...

Coding Italics / Bolding into a String
Word 2007: There are times that I would much rather insert a code to toggle bolding (or italics) in a lengthy string of text rather than having to break up the string to do this. Can this be done? How? Hi LA Lawyer, You can't modify the formatting of individual characters in a string, since a string has not formatting. So, you can continue as you have been doing, or you can insert the whole string in one go, then modify the formatting afterwards (eg using Find/Replace). -- Cheers macropod [Microsoft MVP - Word] "LA Lawyer" <>...

Creating a chart with text not numbers
How do I create a chart that has text values (freshman, sophomore, junior, senior) instead of numbers (1, 2, 3, 4)? I have a column labeled "What is your class standing?" and below it is 166 rows where people selected "Freshman," "Sophomore," etc. I want to create a bar chart that counts how many people selected each of the four classes. Thanks, Alan First of all, you will have numbers to plot. The words are your category labels. Read how to turn a column of words like this into a histogram: - Jon...

Expanding Length of Form
Current form only allows 22 inched in width. How can I expand/increase this length? AFAIK you can't, and why would you want to? A form this wide would mean your users would have to do a whole lot of scrolling back and forth, which IMO would get old really fast. -- _________ Sean Bailey "Sorting in a Graph" wrote: > Current form only allows 22 inched in width. How can I expand/increase this > length? > I have a table with many columns and can not get them all on a form that is set up by rows. Any suggestions on how to handle the additional columns. "Beet...

Find formulas w links to other files and paste values
I'm trying to find a way to highlight all cells in one go which hav links to other files. My next step would be to copy and then past values. This in order to speed up the file's calculations when forward the file to other people who don't have access to the sam external file. Does anyone know how to highlight all cells with external links?? Thanks! //Mattia -- bjar ----------------------------------------------------------------------- bjare's Profile: View this thread:

Code no longer works
Hi I'm using Access2007 and have the procedure below on after update - which works perfectly fine in my environment - though when the user installs it the code no longer works. I have decompiled the DB and also "unsandboxed" it ... (per a previous posts answer) though this hasn't fixed it. There are also 3 other after update events (around making boxes invisible etc) that are not working either. Any clues on where I might start looking? Private Sub cboSearch_AfterUpdate() With Me.RecordsetClone .FindFirst "ContactID = " & CBOSearc...

Text in columns all into one column
I use the Data text to columns option all the time when I need t seperate things into several columns. How do I do the opposite. I want to take the text that is in severa columns and put it into one column? or how do I take text that is in A,B,C,D columns and add them all int one column A? Thanks in advance, Toni -- Message posted from In cell a2 type =a1&b1&c1&d1 If you need spaces to separate do the following =a1&" "&b1&" "&c1&" "&d1 Then copy cell a2 and pastespecial/values into a1. Carlo...

Stopping other wkbks sharing code
How can I stop this code working except for the wkbk it's associated with? If I open the wkbk that has this code and then another wkbk, and I try to close both wkbks at the same time....kapow! Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.Calculation = xlCalculationAutomatic Application.CellDragAndDrop = True If Sheet4.FilterMode Then Sheet4.ShowAllData If Sheet4.Range("N13") > 0 Then Sheet4.Range("N5:N12") = False Sheet10.Select End Sub Thanks Rob What does kapow mean? Your code worked ok for me in my simple test. Are you...

standard replys in Outlook 2002
Hi all ... Maybe a very basic question, but here we go: I get several mails eatch day, that could use a standard reply. Now, i would like to make a button in my toolbar, when clicking on it i get a listing of predefined replys (templates). When i choose one out of this list, it will create a custom reply, that includes the original message, and puts in some predefined text. How can this be done? I suppose that the above will require some VBA? Don't know anything about this! Any other solutions? And then, how can i create mailtemplates in Outlook2002? Are these all forms? If yes, i'm t...

from someone OR with text in subject
Hi, How do I make a rule that puts mail in a folder if it is from someone *or* has a specific word in the subject line. When I try I always get *and*. Thanks in advance Jan Make two rules, one for each condition. --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers "Jan" <> wrote in message = news:20a7d$429f005d$c3a990f6$ > Hi, > How do I make a rule that puts mail in a folder if it is from...

Passing a variable from sheet code to a module
Is it possible to pass a variable from a worksheet_calculate macro to a macro in a module? I'm familiar with public variables and calling functions, but these don't enable me to do what I need. Put a variable declaration as public before the first procedure in a standard VBA module (NOT a worksheet module OR a form module). Ex: PUBLIC varTest as variant This variable is now available to ALL MODULEs including worksheet modules -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "Robert Pearson&quo...

Cannot import data from CSV
Trying to import data into CRM 4.0 Go to Data Management and press "New" button. Import Data Wizard -> Browse for .csv file - press "Next" Import Data Wizard - Select Record Type : Data Map (press button to go to Data Map page) Look Up Records -> Press "New" Data Map:New - select Record Type from ddl: then press "Attributes" link in menu Press "Load Sample Data ..." button Upload Sample Data dialog -> Browse - locate .csv file Press OK ERROR: "The file is too large and cannot be uploaded. Please reduce the size of the file and...

read an ascii file with fopen
I try to open with fopen and read an ascii file, line by line, but get garbage - among the right data in the CString variable that is filled with this line data. Can someone copy&paste the right code how to so that? Thanks in advance. Mark "Mark" <> wrote in message news:%23sPmEzsgGHA.2208@TK2MSFTNGP05.phx.gbl... > I try to open with fopen and read an ascii file, line by line, but get > garbage - among the right data in the CString variable that is filled with > this line data. > > Can someone copy&paste the right code how to so that?...

Modify code
Hi, I have applied the following code to my worksheet: Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count > 1 Then Exit Sub If Not Intersect(Range("A1:A20"), .Cells) Is Nothing Then Application.EnableEvents = False If IsEmpty(.Value) Then .Offset(0, 1).ClearContents Else With .Offset(0, 1) .NumberFormat = "dd mmm yyyy" .Value = Now End With ...

Decimal Place Problem via Export
When converting a report into an excel file for email , it somehow shows the 2 decimal places on the excel spreadsheet - even though I had indicated within the report that the Format=Standard Decimal=0 I eventually wanted to create a format like 200,000 but it's giving me 200,000.00 I can manually strip the 2 decimal places in excell but do not want the user to play with this functionality. Could someone assist. Try using the Format() function. Iin your control source of the field on your report, use something like: "=Format([myNumber],######) See Access help file for Forma...

covering part of a text box border
I want to have a large text box with a border...I then want to place a smaller text box within the larger one (with its own border). However, some of the border of the large text box is vissible within the small text box. Is there a way to set the small text box on top of the larger one and partially cover the large text box border? I can not find an answer to this problem after many searches. set the smaller box on a higher layer and set a fill color on the = smaller box. "Willie Birdie" <Willie> wrote in = message news:95B71C45-E4BD-...

FRX Export
Hi I want to export FRX report from one user to other. Any one can help me Thankx in Advance When you say "Export the report" are you referring to sending the building blocks of the report (Rows, Columns, Tree, Catalog), or sending them the actual report? If you want to send them the report, generate the report, and it will save in your I/O floder as a .frd file (this depends on the output type when you run the report). You can send them that file, and as long as they have at a minimum, the drill down viewer installed on there machine, they will be able to open and view...

Converting a text time into a time format.
Hi Here's my problem. I have a text field that is "00:13:45" and i would like to covert that into a time field of "hh:mm:ss" in order to calculate totals/averages. Currently if i change the format of the cell to a hh:mm:ss format it will not change the actual data in the field until you activate(F2) in each cell. I'm familiar with the Timevalue() formula but i would like to avoid adding more columns into the spread sheet Is there a simple way to do this with out having to activate(F2) each of the fields in order for the time to convert. Any one know if i can c...

How to open a password protected powerpoint file by Excel macro
Thank you ...

XML error "Some Data Was Imported As Text"
Daily, I recieve a 3rd party XML file that I parse in Excel (using an excel macro) and then import into an Access database. Infrequently, the data will import into Excel, then parse and then the routine stops with the error message above. I look through the raw XML file and everything appears to be within the brackets, etc. Can someone give me some clarification to the meaning of the error message? Thanks in advance and Mery Christmas and Happy Holidays! The error message might be generated within your macro - as it is parsing the data it might detect that some field which should be ...