有没有办法编写一个查询输出,使用FileSystemObject的一个文本文件?
Is there a way to write a query output to a text file using FileSystemObject?
什么是查询结果的格式?你也许可以做这样的事情,如果它是一个简单的字符串,或者您可能需要提取你需要的比特。
What's the format of the query results? you may be able to do something like this if it's a simple string, or you may have to extract the bits that you need.
这里的code使用FileSystemObject写一个字符串到一个文本文件中:
Here's the code to write a string to a text file using the filesystemobject:
Const fsoForAppend = 8
Dim objFSO
Dim queryResult
queryResult = 'OMG no results'
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Open the text file
Dim objTextStream
Set objTextStream = objFSO.OpenTextFile("C:\path\to\logfile.txt", fsoForAppend)
'Write the results to the textfile
objTextStream.WriteLine queryResult
'Close the file and clean up
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
上一篇:Sonoport如何播放音频(动作)音频、动作、Sonoport
下一篇:从Javascript ExternalInterface的通话读取时的ByteArray类型转换失败类型、Javascript、ExternalInterface、ByteArray