txt archivos - José Félix ♞ https://helpmybusinesspos.info/tag/txt/ Whats 7222816462. Mejoramos la experiencia en el Punto de Venta de tu NEGOCIO Fri, 13 Mar 2015 02:37:55 +0000 es hourly 1 https://wordpress.org/?v=7.0.3 https://i0.wp.com/helpmybusinesspos.info/wp-content/uploads/2019/08/cropped-logohelp.jpg?fit=32%2C32&ssl=1 txt archivos - José Félix ♞ https://helpmybusinesspos.info/tag/txt/ 32 32 89058970 Exportar a texto .txt https://helpmybusinesspos.info/exportar-a-texto/ https://helpmybusinesspos.info/exportar-a-texto/#respond Tue, 20 Jan 2015 13:16:27 +0000 http://helpmybusinesspos.info/?p=15081 Este es un ejemlo de cómo exportar a un archivo de texto. Sub Main() Dim rstClientes Dim s Set rstClientes = CreaRecordSet( _ "SELECT * FROM clients", Ambiente.Connection ) s = "" If ExisteArchivo( "c:\clientes.txt" ) = True Then If Question( "Desea eliminar el archivo", 2 ) = True Then EliminaArchivo "c:\clientes.txt" End If End […]

El cargo Exportar a texto .txt apareció primero en José Félix ♞.

]]>
Este es un ejemlo de cómo exportar a un archivo de texto.

Sub Main()
Dim rstClientes
Dim s

Set rstClientes = CreaRecordSet( _
"SELECT * FROM clients", Ambiente.Connection )

s = ""

If ExisteArchivo( "c:\clientes.txt" ) = True Then
If Question( "Desea eliminar el archivo", 2 ) = True Then
EliminaArchivo "c:\clientes.txt"
End If
End If

While Not rstClientes.EOF
s = Chr(34) & rstClientes("cliente") & Chr(34) & _
Chr(9) & Chr(34) & rstClientes("nombre") & Chr(34) & _
Chr(9) & Chr(34) & rstClientes("telefono") & Chr(34) & vbCrLf
OutLine "c:\clientes.txt", s
rstClientes.MoveNext
Wend

If Question( "Desea abrir el archivo", 1 ) = True Then
ShellRun Parent.hWnd, "Open", "c:\clientes.txt"
End If

End Sub

Este script puede ser de utilidad si quisiéramos ver un texto con los clientes o cualquier otro layout que se requiera para otros sistemas.

He utilizado para servicoos como facturación cfdi y para tiempo aire.
La función ExisteArchivo es genial porque lo único que escribimos como parámetro es la ruta de nuestro archivo de texto.

Lo importante es probar todas las posibilidades que existen para tener la información disponible para hacer lo que las reglas del negocio requiere.

El cargo Exportar a texto .txt apareció primero en José Félix ♞.

]]>
https://helpmybusinesspos.info/exportar-a-texto/feed/ 0 15081
Importar desde texto .txt https://helpmybusinesspos.info/importar-desde-texto/ https://helpmybusinesspos.info/importar-desde-texto/#respond Mon, 19 Jan 2015 13:17:00 +0000 http://helpmybusinesspos.info/?p=15083 Este ejemplo muestra como importar un archivo txt Sub Main() Dim s, cliente, telefono, dondeEstaEltabulador Dim Query, rstCliente Set Query = NewQuery() Set Query.Connection = Ambiente.Connection CloseFile 1 OpenFile "c:\clientes.txt", 1 While Not FileEOF( 1 ) s = ReadLine( 1 ) dondeEstaEltabulador = clAt( Chr(9), s ) cliente = Mid( s, 1, dondeEstaElTabulador - 1 […]

El cargo Importar desde texto .txt apareció primero en José Félix ♞.

]]>
Este ejemplo muestra como importar un archivo txt


Sub Main()
Dim s, cliente, telefono, dondeEstaEltabulador
Dim Query, rstCliente

Set Query = NewQuery()
Set Query.Connection = Ambiente.Connection

CloseFile 1

OpenFile "c:\clientes.txt", 1

While Not FileEOF( 1 )

s = ReadLine( 1 )

dondeEstaEltabulador = clAt( Chr(9), s )
cliente = Mid( s, 1, dondeEstaElTabulador - 1 )
cliente = Replace( cliente, Chr(34), "" )

s = Mid( s, dondeEstaElTabulador + 1 )

dondeEstaEltabulador = clAt( Chr(9), s )
nombre = Mid( s, 1, dondeEstaElTabulador - 1 )
nombre = Replace( nombre, Chr(34), "" )

telefono = Mid( s, dondeEstaElTabulador + 1 )
telefono = Replace( telefono, Chr(34), "" )

Set rstCliente = Rst( _
"SELECT cliente FROM clients WHERE cliente = '" & cliente & "'", _
Ambiente.Connection )

Query.Reset

If rstCliente.EOF Then
Query.strState = "INSERT"
Else
Query.strState = "UPDATE"
Query.Condition = "cliente = '" & cliente & "'"
End If

' Tabla, campo, valor
Query.AddField "clients", "cliente", cliente
Query.AddField "clients", "nombre", nombre
Query.AddField "clients", "telefono", telefono
Query.CreateQuery
Query.Execute

Wend

CloseFile 1

End Sub

Esta función podría ser una opción para interconectar mybusiness pos con otras herramientas externas de una forma sencilla. Utilizo la importación para descifrar la respuesta de tiempo aire y funciona bastante bien.

El cargo Importar desde texto .txt apareció primero en José Félix ♞.

]]>
https://helpmybusinesspos.info/importar-desde-texto/feed/ 0 15083