exporting access query to text file line feed
I am creating a sql query for开发者_如何转开发 an access database that will be exported to a text file. The requirements include a line feed separating each line. Does that happen by default, or its something that I need to add in? If I need to add it, how do I do that?
TIA
TransferText includes LineFeed and I am fairly sure most methods of getting text out of Access will include linefeed, unless you do something to stop it. It is not too difficult to check.
Dim fs As New FileSystemObject
s = "c:\docs\test.txt"
DoCmd.TransferText acExportDelim, , "query6", s
Set f = fs.OpenTextFile(s)
a = f.ReadAll
''Split at linefeed: Chr(10)
aa = Split(a, Chr(10))
''Test 1
Debug.Print UBound(aa)
''Test 2
For Each itm In aa
Debug.Print itm
Next
精彩评论