Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

postgresql & vb

Status
Not open for further replies.

mikeklih

Programmer
Jul 21, 2002
2
MY
i use linux as server with postgresql as database management system. i am trying to use vb to develop a program to due with the database. i have installed the odbc driver of postgresql.

then i use the data environment to connect to database. but every time i fail to conect the database. can someone tell me what is wrong.

here is the process
1.select properties of the connetion.
2.select the provider "microsoft OLE DB providers for ODBC Drivers"
3.Click next button to set up the connection.
4.choose the option of "use connetion string"
5.click on the build button
6.click new button on the pop up form "select data source"
7.select driver of postgresql driver
8.choose the path to save for the dsn
9.click 'next' and then 'finish'
10.pop up from ask to enter "missing information"
11.i input the database, server
12.then when i test the connection, one error message pop up "test connection failed because of an error in initialising provider %1"

Please, help me to solve this problems

 
Is Postgres running w/the -i switch so that it is using TCP/IP?

Have you set up the Postgres config file to allow the client access to the db?

I've had a very good experience w/using the ODBC for PostgreSQL and usually when I've had problems connecting- they've been on the server side.

Check the user name and password too.

Just some ideas.

 
Hello,
That error almost sounds like its a problem with your ODBC driver (reinstall?). Or you could create a dsn for post

If its the TCP issue, this is what I would do to troubleshoot it:

Telnet/ssh into the linux server and pull a "netstat -l" to see if postgresql is using tcp/ip (it uses unix sockets only by default). The output would include this if it does accept tcp connections:
tcp 0 0 *:postgres *:* LISTEN
If you dont see that and are using (I think) Mandrakes distro of the postgresql server, then you would go to /var/lib/pgsql/data for this next part. First I would check the postgresql.conf file and make sure that "tcpip_socket = true".
If it is using tcp sockets and just not allowing you to connect, you would have to add permission for your machine to log into postgres by editing the pg_hba.conf file. Heres a sample:
host all 192.168.1.1 255.255.255.255 trust
where my IP is 192.168.1.1.
I hope that this helps,
Brian
bking AT affcu DOT com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top