[Gambas-user] FORM.Name overridden.... FORM.Delete overridden errors
Pino Zollo
pinozollo at ...626...
Fri Dec 13 20:46:49 CET 2013
Gambas 3.5.1
A TextBox with name "Name" gives FORM.Name Overridden error
-------------------------------------------------------------------
The string "DELETE" gives error FORM.Delete overridden at line:
If FBand.ComboBand.Text <> "WFAX" Then
-------------------------------------------------------------
Public Sub Call_LostFocus()
Dim GMT As Date
Dim F As Float
Dim FRMHZ As String
Dim sql As String
FRMHZ = FRtoMHz() ' This depends on comma
GMT = Vb.DateAdd("h", - toffset, Now)
If Run Then
If Not CheckCQ() Then
rData = Mglobal.$hConn.Exec("DELETE FROM spots WHERE DXCall =
'CQ <---' AND dxband = '" &
ComboBand.Text & "' ;") ' it was on
different frequency
' DEBUG "Deleted by Call_LostFocus "
' IF comma THEN
If FBand.ComboBand.Text <> "WFAX" Then '
<------------***********************************************************
sql = "INSERT INTO spots " &
"(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry, dxstat,
dxmode, radiomode ) " &
"VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT) &
" " &
Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" & "CQ
<---" & "','" &
FRMHz & "','" & FRMHz &
"','" & ComboBand.Text & "','" & "" & "','" & "CQCQ" &
"','" & ComboMode.Text & "','" & RigMode & " " & RigBand & "'); "
Else
sql = "INSERT INTO spots " &
"(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
"VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT)
& " " &
Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" &
UCase$(Call.Text) & "','" &
FRMHz & "','" & FRMHz &
"','" & FBand.ComboBand.Text & "','" & "WFAX" & "','" &
"DIAL" & "','" & ComboMode.Text & "','" & RigMode & " " & RigBand & "'); "
Endif
rData = Mglobal.$hConn.Exec(sql)
' rData = Mglobal.$hConn.Exec("INSERT INTO spots " &
' "(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
' "VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT)
& " " &
' Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" & "CQ
<---" & "','" &
' FRMHz & "','" & FRMHz &
' "','" & ComboBand.Text & "','" & "" & "','" & "CQCQ" &
"','" & ComboMode.Text & "','" & RigMode & " " & RigBand & "'); ")
' ELSE
' rData = Mglobal.$hConn.Exec("INSERT INTO spots " &
' "(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
' "VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT)
& " " &
' Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" & "CQ
<---" & "','" &
' Replace$(Replace$(FreqRadio.text, ".", ""), ",", ".") &
"','" & Replace$(Replace$(FreqRadio.text, ".", ""), ",", ".")&
' "','" & ComboBand.Text & "','" & "" & "','" & "CQCQ" &
"','" & ComboMode.Text & "','" & RigMode & " " & RigBand & "'); ")
' ENDIF
rData = Mglobal.$hConn.Exec("delete FROM spots where dxcall <>
'CQ <---' and freqrx = (select freqrx from spots where dxcall = 'CQ
<---' AND dxband = '" &
ComboBand.Text & "' ); ") ' <--- errore
nella subquery.. c'è un altro CQ in altra banda e dà 2 risultati
If FBandActive Then FBand.FillForm()
End If
Else
If Not CheckCall(Call.text) Then
If Call.Text <> "" Then
' IF comma THEN
If FBand.ComboBand.Text <> "WFAX" Then
sql = "INSERT INTO spots " &
"(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
"VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT)
& " " &
Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" &
UCase$(Call.Text) & "','" &
FRMHz & "','" & FRMHz &
"','" & ComboBand.Text & "','" & LabCountry.Text & "','" &
"DIAL" & "','" & ComboMode.Text & "','" & RigMode & " " & RigBand & "'); "
Else
sql = "INSERT INTO spots " &
"(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
"VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT)
& " " &
Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" &
UCase$(Call.Text) & "','" &
FRMHz & "','" & FRMHz &
"','" & FBand.ComboBand.Text & "','" & "WFAX" & "','" &
"DIAL" & "','" & ComboMode.Text & "','" & RigMode & " " & RigBand & "'); "
Endif
rData = Mglobal.$hConn.Exec(sql)
' rData = Mglobal.$hConn.Exec("INSERT INTO spots " &
' "(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
' "VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" &
Year(GMT) & " " &
' Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" &
UCase$(Call.Text) & "','" &
' FRMHz & "','" & FRMHz &
' "','" & ComboBand.Text & "','" & LabCountry.Text & "','"
& "DIAL" & "','" & ComboMode.Text & "','" & RigMode & " " & RigBand &
"'); ")
' ELSE
' rData = Mglobal.$hConn.Exec("INSERT INTO spots " &
' "(SpotTS, DXcall, FreqRX, FreqQSX, dxband, dxcountry,
dxstat, dxmode, radiomode ) " &
' "VALUES( '" & Day(GMT) & "/" & Month(GMT) & "/" & Year(GMT)
& " " &
' Time(Hour(GMT), Minute(GMT), Second(GMT)) & "','" &
UCase$(Call.Text) & "','" &
' Replace$(Replace$(FreqRadio.text, ".", ""), ",", ".") &
"','" & Replace$(Replace$(FreqRadio.text, ".", ""), ",", ".")&
' "','" & ComboBand.Text & "','" & LabCountry.Text & "','"
& "DIAL" & "','" & ComboMode.Text & "','" & RigMode & " " & RigBand &
"'); ")
' ENDIF
If FBandActive Then FBand.FillForm()
End If
End If
End If
If comma Then
Try Freqb4 = Val(Replace$(Replace$(FreqRadio.text, ",", ""), ".",
",")) ' <----- Tranverters ???
Else
Try Freqb4 = Val(Replace$(FreqRadio.text, ",", "")) / 1000
Endif
' DEBUG "Freqb4 ", Freqb4
Catch
Message.Error("Call Lost Focus: " & Error.Text & " " & Error.Where)
End
-----------------------------------------------------------------------------------
These misbehaviours were not present in Gambas2 !
-------------------------
Salud
Pino
More information about the User
mailing list