#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2009
    Posts
    25
    Rep Power
    0

    Angry Accessing PostgreSQL database from ASP


    Hi! I have a PostgreSQL database running on my computer and I need to execute SQL from ASP pages to get back recordsets from the database. This has proved to be a problem.

    This is what I'm doing:

    Code:
    sConnection ="DRIVER={postgreSQL};SERVER=localhost;database=thescr;UID=mike;PASSWORD=mike123;port=5432"
    Then when I access that ASP page I get this error on the row above:

    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
    
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 
    
    /4scrapestuff/test.asp, line 8
    I have installed "psqlodbc_08_04_0100.zip" I got from the official homepage, which was supposed to be the "PostgreSQL ODBC driver". However it still doesn't work. I'm using Windows Vista 64bit.

    Is there some other way of getting access to the database from classic ASP without using a ODBC connection?

    Please help me gain access to the database from ASP script!
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,439
    Rep Power
    4539
    You're going to have to find the solution at the postgres end. You must get the postgres drivers installed on your asp web server to use postgres from asp code.

    Make sure you're getting a version that is listed as compatible with your version of windows. Verify you're using the correct connection string.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2009
    Posts
    25
    Rep Power
    0
    Thanks you for your post, but I just accessed the database using Java so case closed!

    Here's a link to the thread in case anyone is interested:
    http://forums.devshed.com/java-help-9/accessing-postgresql-database-from-java-647191.html
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2014
    Posts
    5
    Rep Power
    0

    Can You Help Me With Same?


    Hi,

    I just came across your post. I am having the same issue. I have a hosting account on a shared Windows server and they do not support turning on the postgreSQL. They want to charge me an enormous amount of money for a virtual or dedicated server. It's enormous because I am not a server administrator. I am a database/web application developer. Anyway, I'm looking for another solution where nothing needs to be turned on for the shared server. This JDBC looks like an option, but I don't recognize the format? Can you show the example of how it works on your asp page please? I am also using classic asp.





    Originally Posted by Mackan2009
    Thanks you for your post, but I just accessed the database using Java so case closed!

    Here's a link to the thread in case anyone is interested:
    http://forums.devshed.com/java-help-...va-647191.html

IMN logo majestic logo threadwatch logo seochat tools logo