Feb 16, 2003, 9:24 AM
Post #1 of 7
The following code:
Writing DB results to File
$conn = CreateObject OLE "ADODB.Connection" ||
die "CreateObject: $!";
$sql = "SELECT * FROM Output";
$rs = $conn->Execute($sql);
$myFile = $rs->Fields('File')->Value;
$myHandle = $rs->Fields('Handle')->Value;
produces the following output:
Question: How would I modify the script to produce a text file for each record in the DB where each field would be displayed on a separate line (using the first field as the name of the text file).
Thus, the format in each file would be in the following format:
File 1000.txt would look like this:
and File 8200.txt would look like this:
and so on and so forth...