Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ado text file

    I have a bunch of variables, and their values - I wanna save these to a text
    file as through the adodb.

    I found the connection string, but I don't quite get how to add the records
    in this case.

    Do i Start with an empty Text file , then execute a Create table SQL
    statement, the way I would do to an Access table?

    rs.createtable?? or what

    I'm stuck on that step.

    thanks.

    The step i am stuck on is the step where I have a bunch of variables, and
    their values.

    Then I do set conn= server.createobject("adodb.connection")
    set rs= server.createobject("adodb.recordset")

    myvariable1 = "horse"
    myvariable2 = "cow"
    myvariable3= "sheep"
    myvariable4= "personal lubricant"

    Now howami going to take this and get to the RS.save to a blank text file?

    Example please.



    Tammy B. Guest

  2. Similar Questions and Discussions

    1. text field including text from a text file *.txt
      Hi, I would like to insert a text field which includes text from a text file. I know it must be possible but unfortunately I cannot find any help...
    2. Animating text from a external text file
      Hi, can someone please guide me on how to animate text in flash which is loaded from a external text file. The way we load text in dynamic text box...
    3. Load Text from Text file with html links?
      Try http://opensource.brajeshwar.com/downloads/dynamictextscroll/ and just change it to your liking, it have html links as far as I can remember. ...
    4. displaying text from an external text file
      Hi Guys I have created a basic Flash 'thing' that fades in and out about 10 words from various angles. What I would like to be able to do is...
    5. Field Text vx Regular Text File Size
      Why is regular text so much larger in file size than regular text? Is there some "magic" way to reduce the file size of regular text blocks?
  3. #2

    Default Re: ado text file

    How do you want to store the values? As a recordset? If so, use the
    rs.Fields.Append method to add Fields to your unopened recordset, open the
    recordset, add your data, then use the rs.Save method to save the results to
    a text file. See online help for details. Google can also help here. I know
    I've posted an example of the above at least once.

    On the other hand, if you just need to store them as comma-delimited values,
    don't bother with a recordset. Use the filesystemobject to do this:
    [url]http://msdn.microsoft.com/library/en-us/script56/html/sgworkingwithfiles.asp[/url]

    HTH,
    Bob Barrows


    Tammy B. wrote:
    > I have a bunch of variables, and their values - I wanna save these to
    > a text file as through the adodb.
    >
    > I found the connection string, but I don't quite get how to add the
    > records in this case.
    >
    > Do i Start with an empty Text file , then execute a Create table SQL
    > statement, the way I would do to an Access table?
    >
    > rs.createtable?? or what
    >
    > I'm stuck on that step.
    >
    > thanks.
    >
    > The step i am stuck on is the step where I have a bunch of
    > variables, and their values.
    >
    > Then I do set conn= server.createobject("adodb.connection")
    > set rs= server.createobject("adodb.recordset")
    >
    > myvariable1 = "horse"
    > myvariable2 = "cow"
    > myvariable3= "sheep"
    > myvariable4= "personal lubricant"
    >
    > Now howami going to take this and get to the RS.save to a blank text
    > file?
    >
    > Example please.


    Bob Barrows Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139