Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3768

Sample Program PostgresSql problem?

$
0
0

Hello;
Running the example program PostgresSQL Example in 2024R2 on a mac , when I hit hit -Connect to PostgresSQL- I expect to get an error message as I am not running a server to connect to.

Instead the program throws a Database exception error. Here is the code from the example.

Thanks

mDb = New PostgreSQLDatabase

mDb.Host = "localhost"
mDb.UserName = "postgres"
mDb.Password = "password"
mDb.AppName = App.ExecutableFile.Name
mDb.DatabaseName = "postgres"

Try
  mDb.Connect
Catch err As DatabaseException
  mIsConnected = False
  ConnectStatusLabel.Text = "Error connecting to PostgreSQL: " + err.Message
  Return
End Try

mIsConnected = True
ConnectStatusLabel.Text = "Connected to PostgreSQL!"

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3768

Trending Articles