Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    139

    Unanswered: Enumerating a list

    Sorry for the tome, I need to output information to a text file, I'm using the writeline command in VB and so far I have the following and it works fine-

    Dim strHeader As String, strBody As String, strTail As String

    strHeader = "01" & Me!CUST_NUMBER & "," & Me!CUST_NAME
    strBody = "02" & "6" & "," & "1" & "," & Me!TTNUM & "," & Me!TTCode

    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile("H:\Text_Files\Test.txt", True)
    a.WriteLine (strHeader)
    a.WriteLine (strBody)
    a.WriteLine
    a.Close

    I'm having difficulty with the third part of the file, what I'm calling strTail. I'm thinking about opening a recordset based on a query
    03 [ITEM_NUMBER],[PRICE],[QUANTITY]

    The final output needs to look like this-

    03B130907540,5.41 ,1
    03B130907550,5.41 ,1
    03B130907560,5.41 ,1
    03B130907570,6.04 ,1
    03B065007550,1.72 ,2

    Problem is the above list could be 2 lines or 100, I'm not sure If I should try to put this into a variable or go some other route.

    Any recommendations?
    Thanks,
    Bill

  2. #2
    Join Date
    Jun 2004
    Location
    Saratoga Springs
    Posts
    24
    How does this look (see attached file)?

    Hope this helps
    Attached Files Attached Files
    Jon Jaussi, OCP DBA
    D4L Data Managent Solutions
    D4L_solutions@comcast.net

  3. #3
    Join Date
    Mar 2004
    Posts
    139
    This helps a great deal, thanks very much. I'm a little confused with the schema.ini file, though. I've created one and saved it to the location of the exported files but it's telling me it doesn't exist. I'm not sure if I'm supposed to name the schema.ini file to the specification name or identify the specification name within the schema.ini?
    Thanks,
    Bill

Posting Permissions

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