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
DOH!!
Originally I was getting an error on rTable and $hConn variable "Null
Object" or something like that.
Think thats why I added the $hConn statements, it got rid of the "null"
error but then other error's popped up.
Must remember only open sqlite once!!!
Thanks Oliver.
On Thu, 2012-08-09 at 2
You repeat the same problem than yesterday.
Cordialement,
Olivier Cruilles
Mail: linu...@club-internet.fr
Le 9 août 2012 à 21:37, rocko a écrit :
FNew CODE:>>>
' Gambas class file
'
Private rTable As Result
Public Sub btnCommit_Click()
FM
Sure can.
FMain CODE:>
' Gambas class file
Public $hConn As Connection
Public Sub _new()
End
Public Sub Form_Open()
$hConn = New Connection
With $hConn
.Host = "/home/rocko/DataBases"
.Name = "my_test.sqlite"
.Type = "sqlite"
End With
Try $hConn.Open
If Error T
Can you put the code that you obtain now in a main Form and in the second Form
please ?
Cordialement,
Olivier Cruilles
Mail: linu...@club-internet.fr
Le 9 août 2012 à 21:22, rocko a écrit :
> Ok I see,
> I've added FMain.
> but now I'm getting "Driver name missing" at FMain.Open
>
>
>
Ok I see,
I've added FMain.
but now I'm getting "Driver name missing" at FMain.Open
On Thu, 2012-08-09 at 21:08 +0200, Olivier Cruilles wrote:
> Hello,
>
> When you declare a variable as PUBLIC in a Form (Ex: FMain) and if you want
> to access to this variable from another Form you need t
Hello,
When you declare a variable as PUBLIC in a Form (Ex: FMain) and if you want to
access to this variable from another Form you need to rewrite the first Form
like that:
In the second Form use this: FMain.$hConn(But only if the variable is
declared as PUBLIC, not PRIVATE)
Cordia
If I declare a Public variable is it available across all Forms and
Modules??
I ask because I'm having difficulty with a $hConn variable
I have a FMain form that connects to an sqlite database when the form is
opened.
Public Sub Form_Open()
$hConn = New Connection
With $hConn