Visual Basic - Exportar recordset a txt

Life is soft - evento anual de software empresarial
 
Vista:

Exportar recordset a txt

Publicado por Danielito (3 intervenciones) el 21/11/2003 19:16:39
Saludos :
Hola amigos un favor alguien tendra una funcion para exportar un recordset a archivo txt, separado por separadores, si alguien tuviese esa funcion bestial.
Mychas gracias por todo a la comunidad.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Exportar recordset a txt

Publicado por Cecilia Colalongo (3116 intervenciones) el 22/11/2003 01:00:25
Puedes utilizar el método GetString de ADO y una función para guardar el archivo:

FilToString MiRecordset.GetString(",",vbCrLF),App.Path & "\MiArchivo.txt"

Public Function StringToFile(StringText As String, FileName As String) As Long
Dim hlngFile As Long
hlngFile = FreeFile
Open FileName For Binary Access Write As hlngFile
Put hlngFile, , StringText
Close hlngFile
StringToFile = FileLen(FileName)
End Function
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar