jllydgnt
02-09-2004, 12:48 PM
I am trying to write the contents of a database to text files. Basically, I want to write each table to its own text file.
To do this, I have a generic function set up that will take the name of the table and open a recordset based on that table's name. It will then loop through the recordset writing each record as a line in a text file. The problem I have is that I need to dynamically determine how many fields are in each table and get all of the fields in a record written to the same line in the text file.
My understanding is that each time you use the write statement, it starts a new line. So I cannot loop through the field count using a seperate write statement for each field. Is there some kind of statement or function that will simply append text to the last write statement? Or a way to prevent the write statement from creating a new line when it is called?
To do this, I have a generic function set up that will take the name of the table and open a recordset based on that table's name. It will then loop through the recordset writing each record as a line in a text file. The problem I have is that I need to dynamically determine how many fields are in each table and get all of the fields in a record written to the same line in the text file.
My understanding is that each time you use the write statement, it starts a new line. So I cannot loop through the field count using a seperate write statement for each field. Is there some kind of statement or function that will simply append text to the last write statement? Or a way to prevent the write statement from creating a new line when it is called?