Sub Globals
Dim CDCLIENTE As Int = 1
Dim CDFICHA As Int = 1
Private vTBEVOLUC As ResultSet
End Sub
Sub Activity_Create(FirstTime As Boolean)
File.Delete(File.DirInternal,"sisac.sql")
If File.Exists(File.DirInternal,"sisac.sql") = False Then
File.Copy(File.DirAssets, "sisac.sql",File.DirInternal,"sisac.sql")
End If
Dim sql As SQL
sql.Initialize(File.DirInternal,"sisac.sql",False)
Dim synt As String
synt="INSERT INTO TbEvoluc (CDCLIENTE,CDFICHA,CDEVOLUC) VALUES (?,?,?)"
sql.ExecNonQuery2(synt, Array As Object( 1,1,1))
sql.Close
CONTAFLORAIS(1)
End Sub
Sub CONTAFLORAIS(vCDEVOLUC As Int)
Dim DB As SQL
DB.Initialize(File.DirInternal,"sisac.sql",False)
S23LEREVOLUC(DB,vCDEVOLUC)
Do While vTBEVOLUC.NextRow
Log ($"READ ${vTBEVOLUC.GetString("CdCliente")} "$ )
Loop
If vTBEVOLUC.IsInitialized Then vTBEVOLUC.Close
If DB.IsInitialized Then DB.close
End Sub
Sub S23LEREVOLUC(pDB As SQL,VCDEVOLUC As Int)
vTBEVOLUC = pDB.ExecQuery("SELECT * FROM TbEvoluc where CdCliente = " & CDCLIENTE & _
" AND CdFicha = " & CDFICHA & _
" AND CdEvoluc = " & VCDEVOLUC )
If vTBEVOLUC.rowcount = 0 Then
MsgboxAsync ( "Error","query")
Return
End If
End Sub