Looks like all is ok. Maybe you can try writing Error.Clear() on before of TRY $DBConn.Open
I'm not sure if problem is related with posgresql because I'm using mysql in my apps. Hope this help you. Regards, Ricardo 2009/11/17 Jean-Yves F. Barbier <12u...@gmail.com> > 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 > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user