Link to home
Start Free TrialLog in
Avatar of sharibabu
sharibabu

asked on

How to Connect Postgres from Visual Basic???

How to Connect Postgres from Visual Basic??? is it possible?? if yes, how??

Provide me with exact solution...

actually postgres is on linux server and vb is on NT client..

thanks in advance

Hari.
ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sharibabu
sharibabu

ASKER

hi bhess1

Thanks for ur solution again...
now iam connecting the postgres from my NT client... i have installed postgres odbc driver on my NT client and executed the project successfully

i have one doubt...

i have made setup of the project and installed on the other NT client(which doesn't contain the postgres odbc driver) but is not executing and giving following runtime error

Run-time error '-2147467259(80004005)':
[Microsoft][ODBC Driver Manager] Data source name not found and no default dirver specified

After that i have installed postgres odbc driver and executed.. even then it is not executing...

should i add any dll's while making the setup??

give the exact solution and also, steps for making a setup.

Thank U...
Have you tried connecting to the other server via the ODBC manager?  Try, and post any error messages returned...

Possible problems:

uid / password problems - are you accepting the default, or do you specify uid/pwd?

Permissions problems - does the user on the new machine have any permissions needed?

Can you show your connection string? (post here)

Check this checklist - this should be what you need to make a connection:

--- ODBC Driver Data Source Checks ---
Valid and resolvable hostname.
Valid port number.  (default is 5432)
Valid and existing database name.
Valid user name.
Valid password for the specified user.  (Required if pg_hba.config is set to password authenticate your client.)



No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: bhess1
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
Question has been closed as per recommendation

JGould-EE Moderator
Watch out for the driver name

When you install the ODBC from PostgreSQL the driver name is set for default to PostgreSQL(version name)

In your first code you say that the driver name is {PostgreSQL}