[Gambas-user] Second Form not reading Public variable from first form
Fabien Bodard
gambas.fr at ...626...
Fri Aug 10 14:21:47 CEST 2012
Then if you use only one connection you can use the last opened connection
in all the project by using DB
in the first form :
Public $hConn as new Connection
Public Sub _New()
$hConn.host=
$hConn.Name=
$hConn.Type="sqlite"
$hConn.Open
Form2.Show
End
In Form2 :
Public Sub Form_Open()
dim hResult as Result
hResult = DB.Find("mytable", "id=&1", 32)
if hResult.Available then
TextBox1.Text = hResult["field"]
Else
Message.Info("No result Found")
endif
end
More information about the User
mailing list