I have an error at compile time that I can not understand, indeed I understand but I do not understand why, even in other activity because I do the same thing.
This error at compile
and this is the code in activity
This error at compile
B4X:
B4A version 4.30
Parsing code. 0.09
Compiling code. Error
Error compiling program.
Error description: Cannot assign void value.
Occurred on line: 47
Dim cur As Cursor=Main.SQLUser.ExecNonQuery (Query)
Word: )
and this is the code in activity
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private BtnClear As Button
Private BtnExit As Button
Private BtnUpdate As Button
Private ImgClear As ImageView
Private ImgExit As ImageView
Private ImgUpdate As ImageView
Private LblBand As Label
Private LblCall As Label
Private LblChange As Label
Private LblDate As Label
Private LblId As Label
Private LblMode As Label
Private LblRstr As Label
Private LblRsts As Label
Private LblTime As Label
Private PnlEdit As Panel
Private TxtBand As EditText
Private TxtCall As EditText
Private TxtChange As EditText
Private TxtData As EditText
Private TxtMode As EditText
Private TxtRstr As EditText
Private TxtRsts As EditText
Private TxtTime As EditText
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("Layout1")
Activity.LoadLayout ("EditRecord")
Dim Query As String ="SELECT * FROM " & Main.ContestName &" WHERE (Id_" & Main.ContestName &" = " & Main.RowSelected &")"
Dim cur As Cursor=Main.SQLUser.ExecNonQuery (Query)
TxtCall.InputType = Bit.OR(TxtCall.INPUT_TYPE_TEXT, 4096)
TxtChange.InputType = Bit.OR(TxtChange.INPUT_TYPE_TEXT, 4096)
TxtMode.InputType = Bit.OR(TxtMode.INPUT_TYPE_TEXT, 4096)
PnlEdit.Top = 20dip : PnlEdit.Left =(Activity.Width /2) - (PnlEdit.Width /2)
TxtTime.Color =Colors.White : TxtBand.Color =Colors.White : TxtBand.Color =Colors.White
TxtCall.Color =Colors.White : TxtChange.Color =Colors.White : TxtData.Color =Colors.White
TxtMode.Color =Colors.White : TxtRstr.Color =Colors.White : TxtRsts.Color =Colors.White
BtnUpdate.Color =Colors.DarkGray : BtnClear.Color =Colors.DarkGray : BtnExit.Color =Colors.DarkGray
LblId.Text ="Edit Qso Number: " & Main.RowSelected
cur.Position =0
TxtCall.Text = cur.GetString ("Call") : TxtTime.Text = cur.GetString ("Time")
TxtBand.Text = cur.GetString ("Band") : TxtChange.Text = cur.GetString ("Change")
TxtData.Text = cur.GetString ("Date") : TxtMode.Text = cur.GetString ("Mode")
TxtRstr.Text = cur.GetString ("Rstr") : TxtRsts.Text = cur.GetString ("Rsts")
End Sub