mirror of
https://github.com/KeymonSoft/DBCheck.git
synced 2026-04-20 04:39:22 +00:00
4/11/23 - Cambios para que se pueda seleccionar de que empresa es la BD, o si la BD trae la info, que la detecte automáticamente.
This commit is contained in:
47
B4A/Subs.bas
47
B4A/Subs.bas
@@ -146,3 +146,50 @@ Sub dameDiaSemana As String 'ignore
|
||||
End If
|
||||
Return ds
|
||||
End Sub
|
||||
|
||||
'Regresa el usuario de la tabla USUARIOA
|
||||
Sub traeUsuarioDeBD As String 'ignore
|
||||
Private c As Cursor
|
||||
Private u As String = "SinUsuario"
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select USUARIO from usuarioa")
|
||||
c.Position = 0
|
||||
If c.RowCount > 0 Then u = c.GetString("USUARIO")
|
||||
c.Close
|
||||
Return u
|
||||
End Sub
|
||||
|
||||
'Regresa la ruta actual de la base de datos.
|
||||
Sub traeRuta As String 'ignore
|
||||
Private c As Cursor
|
||||
Private r As String
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
r = "0"
|
||||
If c.RowCount > 0 Then
|
||||
c.Position=0
|
||||
r = c.GetString("CAT_CL_RUTA")
|
||||
End If
|
||||
c.Close
|
||||
Return r
|
||||
End Sub
|
||||
|
||||
'Regresa el cliente actual desde CUENTAA.
|
||||
Sub traeCliente As String 'ignore
|
||||
Private c As Cursor
|
||||
Private cl As String
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("Select CUENTA from cuentaa")
|
||||
c.Position = 0
|
||||
cl = c.GetString("CUENTA")
|
||||
c.Close
|
||||
Return cl
|
||||
End Sub
|
||||
|
||||
'Regresa el almacen actual de la base de datos.
|
||||
Sub traeAlmacen As String 'ignore
|
||||
Private c As Cursor
|
||||
Private a As String
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select ID_ALMACEN from CAT_ALMACEN")
|
||||
c.Position = 0
|
||||
a = C.GetString("ID_ALMACEN")
|
||||
c.Close
|
||||
Return a
|
||||
End Sub
|
||||
Reference in New Issue
Block a user