Skip navigation
Currently Being Moderated

Unable to connect to PostgreSQL DB

Feb 16, 2008 5:03 PM

I have been able to connect to MySQL DBs fine with Flex Builder 3 to connect them to Flex datagrid forms, by using the Data menu -> "Create Application from Database" approach. However, when I try to connect to PostgreSQL DBs using the same approach, I get an error when I try to select the PostgreSQL JDBC Driver Definition in the Data Source directory:

"Unable to locate jar/zip in the file system, as specified by the driver definition postgresql-8.1-404.jdbc2.jar".

Similarly, if I go to the Connections setting in the Preferences, and select the PostgreSQL driver, the same message appears.

I have located the postgresql-8.1-404.jdbc2.jar file in the ".metadata/.plugins/com.adobe.datatools.derived/drivers/postgresql-8. 1-404.jdbc2.jar", and it is there along with the mysql driver, and looks OK.

I have Googled for information about the error, but have not found anything similar.

Can anybody suggest how to correct this error so that I can access Postgres DBs?

Thanks.
 
Replies
  • Currently Being Moderated
    Feb 18, 2008 5:35 AM   in reply to mcaudy
    Hi,

    The Flex Builder doesn't offer support for PostgreSQL by default so you will have to manually setup it. First you need to go to the PostgreSQL website and download the jdbc driver ( http://jdbc.postgresql.org/download.html). Then from the Connections settings panel in the Preferences remove the old driver and add the driver that you have downloaded.

    Thanks,
    Catalin Anastasoaie
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 19, 2008 1:06 AM   in reply to mcaudy
    Hi,

    What version of Flex Builder are you using? I tried to reproduce your problem with the password not being saved but without any luck. I was able to correctly add the driver from Eclipse main menu > Window > Preferences > Connectivity > Driver Definitios > PostgreSQL > 8.x > PostgreSQL JDBC Driver and in the Edit Driver Definition add the password and userID. As for the question regarding v412 and v404, the 412 is just a newer version of the JDBC driver. If your are looking exactly for the 404 version here is the download link http://jdbc.postgresql.org/download/postgresql-8.1-404.jdbc2.jar

    Thanks,
    Catalin Anastasoaie
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2008 8:06 AM   in reply to mcaudy
    Hi,

    The Flex Builder 3 fully supports Creating a database connection profile only for MySQL Server and Microsoft SQL Server(You can find this in the documentation - by clicking the Help button in the Creating Application from database UI - in the Creating a database connection profile section). The remaining connection profiles are provided by the Eclipse - DTP plugin. It appears that on MAC OS there is an issue with the postgresql driver - you cannot add the userID and password.

    You can file a feature enhancement for the Creating a database connection feature on our bug tracker ( http://bugs.adobe.com/flex) in the Flex Builder - Data wizards category.

    Thank you,
    Catalin Anastasoaie
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points