[Gambas-user] bug?
Jean-Yves F. Barbier
12ukwn at ...626...
Tue Nov 17 02:25:48 CET 2009
Debian sid
gb 2.17
==========
Hi,
I've got a module with public string & connection:
PUBLIC $DBConn AS NEW Connection
PUBLIC MyHost AS String
PUBLIC MyDB AS String
PUBLIC MyUsr AS String
PUBLIC MyPass AS String
'---------------------------------
PUBLIC FUNCTION DBConnect() AS Boolean
PRINT MyDB & "." & MyHost & "." & MyUsr & ":" & MyPass
WITH $DBConn
.Type = "postgresql"
.Host = MyHost
.Name = MyDB
.Port = "5432"
.Login = MyUsr
.Password = MyPass
END WITH
TRY $DBConn.Open
IF ERROR THEN
Message.Error(("Can't connect to DB") & "\n\n" & Error.Text)
RETURN FALSE
ELSE
RETURN TRUE
ENDIF
END
If I forget to fill MyHost & MyDB from the class that calls it, the
function don't raise any error and returns TRUE (?)
How can that be?
JY
--
I don't care what star you're following, get that camel off my front lawn!
-- Heard in Bethlehem
More information about the User
mailing list