Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export table to text file (A2k3; SP1)

    Hi All,
    I need to get something done as quickly as possible and *of course* it's something I really struggle with.
    I've got an Excel worksheet which I import into an Access table; tblConvert_To_LDIF. It's fields are as follows:
    [StudentIDNumber], [LastName], [FirstName], [MiddleName], [EMailName] -- along with 3 inconsequential (for this procedure anyway) fields.

    Re: the attached text file
    I need to place that table into the format shown......
    The code I am attempting to fashion follows the format needed......
    How I am using the code follows that.....
    Last, a few rows of test data.....

    You'll notice that the number of fields required in the text file is greater than the fields I am exporting. I'm having problems "creating" the text file fields and entering a constant value when required. A quick example of the latter:
    companyname: SDSU (companyname will always be SDSU)

    There are *only* around 9,000 records and it will need to be done before each semester. So, yes, I'd like to automate it.

    Thank you.

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Export table to text file (A2k3; SP1)

    I don't understand how the code you posted relates to the requirements, so I only used the beginning and end. Note that I scrapped the strDelimiter argument.

    The code probably won't do exactly what you want, because there are some unexplained items in the requirements - what is LastName557? - but hopefully you can use it as a starting point.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export table to text file (A2k3; SP1)

    Hi Hans,
    Thank you!
    I can work from this. I didn't know that it was "legal" to do...
    '1st line
    VarData = .......
    Print #intFileNum, varData
    2nd line
    etc...
    etc...
    which was the reason for the Chr(10) & Chr(13) and the rest of the "unexplained items in the requirements."

    <hr>what is LastName557? <hr>
    leftovers from cutting the "real" data from the formatting example

    Thank you so much again! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •