Saving the content of a Database’s table in a text file.

Question:

How can I save a Database’s table in a text file?

Solution:

To do so, you can create a Report, configure a Query, and use the Export() method; or you can write the following script in the application:

set cs = Screen.Item(“Query1”).GetADORecordset()
table = cs.GetString(2, , , vbNewLine)
Set aux = CreateObject(“Scripting.FileSystemObject”)

Set aux1a = aux.CreateTextFile(“C:\Text1.txt”, True)
aux1a.Close

 

Set aux1 = aux.OpenTextFile(“C:\Text1.txt”,8)
aux1.WriteLine table
aux1.Close
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *