[Gambas-user] the database connection never errors
johnf
jfabiani at ...1109...
Wed Dec 28 18:36:24 CET 2005
On Wednesday 28 December 2005 03:07, Benoit Minisini wrote:
> On Wednesday 28 December 2005 10:32, johnf wrote:
> > Hi,
> > Dim myconn as Connection
> > WITH myconn
> > .Type = TypeDataBase.Text
> > ' "postgresql"
> > .Host = host.Text
> >
> > .Login = username.Text
> >
> > .Password = password.Text
> >
> > .Name = DataBase.Text
> >
> > END WITH
> > TRY myconn.Open()
> > IF ERROR THEN PRINT "Database cannot be opened. Error =:"; Error.Text
> >
> >
> > The TRY opens even if I pass bad infomation in the text fields. It never
> > errors. Am I doing something wrong? I notice that the database demo
> > also never errors. Suse 10.0 Gambas 1.9.22
> > John
>
> Strange... I get errors there!
>
> What are the values of the MyConn properties exactly? I don't need
> Password :-)
>
> And did you try with the database manager?
I did not try with the database manager. Actually, I don't know how to run it
(remember I'm a newbie). What is the name of the database manager file.
Checking the code in the database example I notice that you never use "TRY
myconn.Open()". The database project always uses "CATCH". Is this why I
don't get errors?
Anyway I only get errors from "exec" commands from my code.
.Type = "postgresql"
.Host = "192.168.1.200"
.Login = "johnf"
.Name = "Real-Acconting"
.Password = "password"
More information about the User
mailing list