|
-
Sep 14th, 2005, 03:56 PM
#1
Thread Starter
Addicted Member
How to get data from table to write to a txt file?
How do you write data from a table into a .txt file, the simplest way? I know this question may sound stupid to the seasoned pro, but I am having trouble wraping my brain around it. Would I declare a variable and = it to a table row? ANy ideas are appreciated.
Thanks!
p.s. I am using SQL and .NET
Last edited by callydata; Sep 14th, 2005 at 03:58 PM.
Reason: forgot somehting
-
Sep 15th, 2005, 10:39 AM
#2
Fanatic Member
Re: How to get data from table to write to a txt file?
Hi,
off the top of my head, would say..
// method if you are pulling from a database table
dim fso
dim file1
function writetotext()
set fso = fso.create ("Scripting.FileSystemObject")
set file1 = OpenTextFile ("c:\file.txt", ForWriting, true)
if rqeuest.form("inserttextsubmitbutton") <> "" then
file1.writeline (request.form("textbox"))
file1.writeBlankLines(1)
if reuqest.form("closefilesubmitbutton") <> "" then
file1.close
end if
end if
end function
this wil take whatever you put into the textbox and input into a file, then close it when your ready.
play around with this code as wrote it off the top of my head, so try it.
ta
kai
As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..
A few things that make a good Developer a Great One.
Methodical and a thorough approach to research and design inevitably leads to success.
Forward thinking is the key to Flow of control.
Never test in the design environment, always test in real time, you get the REAL results.
CBSE & OOSE are the same animal, they just require different techniques, and thinking.
SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
The key to good design is explicit attention to both detail and response.
Think Freely out of the "Box" you're in..... You will soar to better heights.
Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|