wilson09001
New Member
Buenas noches
tengo una pregunta lo que sucede es que me aparece este error
Region Activity Attributes
#FullScreen: True
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim mySQL As SQL
Dim myCUR As Cursor
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim N As SQL
Dim CF As Cursor
Private qry As String
Public FirstTimeMain As Boolean
Dim Flag_actualizar As Boolean = False
Private VARIABLE As EditText
Private LIMPIAR As Button
Private GUARDAR As Button
Private ListView1 As ListView
Private Potencia As EditText
Dim ID As Int
End Sub
Sub ConnectionDB
Dim ConDB As String
ConDB =DBUtils.CopyDBFromAssets("BASEDEDATOS.db") 'contacs_db = database name
N.Initialize(ConDB, "BASEDEDATOS.db", True)
If FirstTimeMain Then
If File.Exists(File.DirInternal,"BASEDEDATOS.db") = False Then
File.Copy(File.DirAssets,"BASEDEDATOS.db", File.DirInternal, "BASEDEDATOS.db")
End If
End If
N.Initialize(File.DirInternal,"BASEDEDATOS.db",True)
qry="select * FROM datos"
Private Rs As ResultSet = N.ExecQuery(qry)
Do While Rs.NextRow
VARIABLE.Text=VARIABLE.Text & Rs.GetString("VARIABLE") & CRLF
Loop
Log("Cantidad de registros: "&N.ExecQuerySingleResult("select * FROM datos"))
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("pant")
Activity.Title="BASE DE DATOS"
ListView1.TwoLinesLayout.Label.TextColor = Colors.Black
ListView1.TwoLinesLayout.Label.TextSize = 20
ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Black
ListView1.TwoLinesLayout.SecondLabel.TextSize = 16
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, PResult As Boolean)
If PResult = True Then
'MsgboxAsync("No permission to access external storage", "")
'Return False
End If
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, PResult As Boolean)
If PResult = True Then
'MsgboxAsync("No permission to access external storage", "")
'Return False
End If
GUARDAR_Click
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Private Sub List_ItemClick (Position As Int, Value As Object)
End Sub
Private Sub GUARDAR_Click
If VARIABLE.Text = "" Then
Msgbox("NO HA METIDO NADA", "Advertencia")
Return False
End If
If Potencia.Text = "" Then
Msgbox("NADA", "Advertencia")
Return False
End If
N.ExecQuerySingleResult("UPDATE datos SET RPM='"& VARIABLE.Text)
End Sub
Private Sub LIMPIAR_Click
End Sub
estoy batallando con esto lo eh inicializado varias veces
tengo una pregunta lo que sucede es que me aparece este error
Region Activity Attributes
#FullScreen: True
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim mySQL As SQL
Dim myCUR As Cursor
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim N As SQL
Dim CF As Cursor
Private qry As String
Public FirstTimeMain As Boolean
Dim Flag_actualizar As Boolean = False
Private VARIABLE As EditText
Private LIMPIAR As Button
Private GUARDAR As Button
Private ListView1 As ListView
Private Potencia As EditText
Dim ID As Int
End Sub
Sub ConnectionDB
Dim ConDB As String
ConDB =DBUtils.CopyDBFromAssets("BASEDEDATOS.db") 'contacs_db = database name
N.Initialize(ConDB, "BASEDEDATOS.db", True)
If FirstTimeMain Then
If File.Exists(File.DirInternal,"BASEDEDATOS.db") = False Then
File.Copy(File.DirAssets,"BASEDEDATOS.db", File.DirInternal, "BASEDEDATOS.db")
End If
End If
N.Initialize(File.DirInternal,"BASEDEDATOS.db",True)
qry="select * FROM datos"
Private Rs As ResultSet = N.ExecQuery(qry)
Do While Rs.NextRow
VARIABLE.Text=VARIABLE.Text & Rs.GetString("VARIABLE") & CRLF
Loop
Log("Cantidad de registros: "&N.ExecQuerySingleResult("select * FROM datos"))
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("pant")
Activity.Title="BASE DE DATOS"
ListView1.TwoLinesLayout.Label.TextColor = Colors.Black
ListView1.TwoLinesLayout.Label.TextSize = 20
ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Black
ListView1.TwoLinesLayout.SecondLabel.TextSize = 16
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, PResult As Boolean)
If PResult = True Then
'MsgboxAsync("No permission to access external storage", "")
'Return False
End If
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, PResult As Boolean)
If PResult = True Then
'MsgboxAsync("No permission to access external storage", "")
'Return False
End If
GUARDAR_Click
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Private Sub List_ItemClick (Position As Int, Value As Object)
End Sub
Private Sub GUARDAR_Click
If VARIABLE.Text = "" Then
Msgbox("NO HA METIDO NADA", "Advertencia")
Return False
End If
If Potencia.Text = "" Then
Msgbox("NADA", "Advertencia")
Return False
End If
N.ExecQuerySingleResult("UPDATE datos SET RPM='"& VARIABLE.Text)
End Sub
Private Sub LIMPIAR_Click
End Sub
estoy batallando con esto lo eh inicializado varias veces