Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JDBC to FM problem [973] invalid database

Featured Replies

  • Newbies

Hello!

I am trying to connect to a Filemaker 5 (.fp5) file from a Java program using JDBC (driver fmpjdbc12.jar). No matter what I put after the second colon in the getConnection("jdbc:fmpro:c:test.fp5") function, I always get the following error upon execution (it compiles fine)B)

JAVA.SQL.SQLException: [973] invalid database

It appears that I have the driver installed correctly, because I can comment out the second line below and it compiles fine. Also, I am able to connect to an Access database using a different driver. I have the file "test.fp5" in the correct folder and open. My code is pasted below:

Class.forName("com.fmi.jdbc.JdbcDriver");

Connection con = DriverManager.getConnection("jdbc:fmpro:c:test.fp5");

I am desperate for help. I am flat out of ideas and things to try. Can anyone help me out?

  • Author
  • Newbies

I got it!!! Yes, it is possible to connect to a FMP 5.5 database through a JDBC connection in a Java app. You have to get the port number right, enable the web companion, install the JDBC driver, and a few days later...it works. Here is the code for anyone else who has ever had this problem: the file is test.fp5

Connection con = DriverManager.getConnection("jdbc:fmpro:http://localhost:80/");

DriverManager Statement s = con.createStatement();

s.execute("SELECT * FROM test");

ResultSet rs = s.getResultSet();

if (rs != null)

while ( rs.next() ) {

System.out.println("Data from test: " + rs.getString(1) );

}

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.