[Gambas-user] Second Form not reading Public variable from first form
Olivier Cruilles
linuxos at ...1896...
Thu Aug 9 21:48:39 CEST 2012
You repeat the same problem than yesterday.
Cordialement,
Olivier Cruilles
Mail: linuxos at ...1896...
Le 9 août 2012 à 21:37, rocko <sunblaster5 at ...626...> a écrit :
FNew CODE:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
' Gambas class file
'
Private rTable As Result
Public Sub btnCommit_Click()
FMain.$hConn = New Connection <- ERROR you don't need to reopen the database, it's already done
FMain.$hConn.Open <- ERROR you don't need to reopen the database, it's already done
rTable = FMain.$hConn.Create("inventory")
If rTable.Available Then
rTable!name = txtName.Text
rTable!type = txtType.Text
Try rTable.Update
If Error Then
Print "Update failed"
Message.Error(ERROR.Text)
Endif
Endif
FMain.$hConn.Commit <- ERROR corrected
End
Public Sub btnCancel_Click()
FNew.Close
End
More information about the User
mailing list