Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    7

    Question Unanswered: PostgreSQL port and pgOledb

    Question
    I try to connect from windows to linux postgresql using pgOLEDB using this 'Provider=PostgreSQL OLE DB Provider;Location=posdbv2005;Data Source=10.10.10.27;UserID=postgres;Password=dlink5 17',
    but this error prompt out " Could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "10.10.10.27" and accepting TCP/IP connections on port 5432?"

    I understand that pgOLEDB ver 1.0.0.15 could not listen to other port except 5432 as default for time being, i try to start the database in port 5432 and another error message prompt as this "
    LOG: could not create IPv6 socket: Address family not supported by protocol
    FATAL: Lock file "/usr/local/pgsql/data/postmaster.pid" always exists
    HINT: Is another postmaster (PID 3248) running in data directory "/usr/local/pgsql/data"? "

    i need to connect to the database at port 5433 using pgOLEDB, can anyone help me?

    thank a lot

    regards,
    chew see

    Answer
    Haven't tried it but you might try:
    'Provider=PostgreSQL OLE DB Provider;Location=posdbv2005;Data Source=10.10.10.27,5433;UserID=postgres;Password=d link5 17'
    That's the syntax I've found that works for other providers.
    __________________
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com


    Question
    Thanks Mirtheil for reply, but when i try to use this syntax to connect, it comes out another error message as below
    "could not translate host name "10.10.10.27,5433" to address: Unknown host."

    Do anyone have any idea to solve this? Please help ...


    Thanks in advance


    regards,
    chew see

  2. #2
    Join Date
    Feb 2005
    Posts
    5
    Hi
    I used to have this message " Could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "10.10.10.27 "

    when the port 5432 is not open to forward trafic to the linux server.

    I suggest that you put the linux server on the DMZ on the router and you should be fine.

  3. #3
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Based on what I've found, the OLEDB provider isn't capable of specifying the port. You'll have to isntall it and run it on the default, 5432, port.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  4. #4
    Join Date
    Jun 2009
    Posts
    2

    Modified PgOleDb

    I've faced the same problem with you. I've made a small patch to pgoledb.dll that allows you to connect to other port than 5432 using 'Extended Properties'.

    Here's the link:

    httphttp://musawa.net/downloads/utilitie...0-modified.rar

    Hope it will works for you

    Regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •