Skip site navigation (1) Skip section navigation (2)

Visual Basic ADODB Connection Problem

From: "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Visual Basic ADODB Connection Problem
Date: 2007-11-14 03:01:27
Message-ID: 00e401c8266a$a6511660$9b0014ac@wbaus090 (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi All,

I posted this on the ODBC list a couple of days ago but haven't had any
reply - not sure if I had the right list. Perhaps it's an admin thing since
it works on one server but not another, maybe it's something obscure between
how I've setup the server that isn't working...?


(Forwarded message below)

> I'm hoping I'm posting this to the right place.
> I've been using PostgreSQL for a couple of years now. I'm successfully
> running several PG servers at work for Data Warehousing and one at home
> for various things (drupal, amarok, development)
> I've decided to experiment with Visual Basic and PostgreSQL as there's
> something I want to develop where I think VB would be best (mainly because
> the only other languages I know are PHP and PICK)
> My problem is, I use the connection string below to connect to the server
> at work, and it connects fine; I can execute SELECT queries etc:
> 	strPG = "Driver={PostgreSQL};" & _
>             ";" & _
>             "PORT=5432;" & _
>             "Database=dwh;" & _
>             "UID=postgres;" & _
>             "PWD=thisisnotreallymypassword"
> But when I take the same string and modify it to connect to my home server
> (via VPN) it fails:
> 	strPG = "Driver={PostgreSQL};" & _
>             "Server=;" & _
>             "PORT=5432;" & _
>             "Database=develop;" & _
>             "UID=postgres;" & _
>             "PWD=anotherpassword"
> The error message in VB is:
> 	"The database does not exist on the server or user authentication
> failed."
> The logs on my home server say:
> 2007-11-12 17:38:22 ESTLOG:  connection received: host=
> port=1148
> 2007-11-12 17:38:22 ESTLOG:  connection authorized: user=postgres
> database=develop
> 2007-11-12 17:38:22 ESTLOG:  duration: 0.173 ms
> 2007-11-12 17:38:22 ESTLOG:  disconnection: session time: 0:00:00.142
> user=postgres database=develop host= port=1148
> I can connect using the same credentials via psql running on one of my
> servers at work fine ( is my work IP address), so it doesn't
> appear to be incorrect username / password or firewall etc.
> My only thought is that I'm using the wrong auth type in pg_hba, but
> they're both the same at work and at home (md5)
> Anyone help me or point me in the right direction?
> Both servers are v8.2 under Linux; work one is 64-bit and home is 32-bit.
> Cheers,
> ~p

THINK BEFORE YOU PRINT - Save paper if you don't really need to print this

*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments

pgsql-admin by date

Next:From: Hutger HauerDate: 2007-11-14 09:50:59
Subject: Monitoring Tool
Previous:From: Tom LaneDate: 2007-11-14 01:22:53
Subject: Re: SHMMAX problem - how much is needed?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group