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.

JAVA - ODBC - FILEMAKER

Featured Replies

  • Newbies

Hi all, I have browsed the entire FAQ list, but I have not found a response to my problem.

I must access FM from a java application that execute inserts and deletes. All is working perfectly but sometimes the java application hangs with the error "Invalid cursor state" and cannot reconnect to the FM unless it is restarted. Other times the java application breaks indefinitely when committing a transaction. May be it's due to the concurrent access to the FM files from java and FM scripts ??

For information I'm using German version of FM and FMServer.

Anyone has never found a similar problem ??

FWIW -- FM client is single threaded, it will execute everything only for single user. And all results are "stateless".

That is the reason I never used scripts from Web.

Now, WC gracefully handles queues of requests, but not for the scripts.

How is in that aspect your Java driver?

Invalid cursor state is an exception thrown by the ResultSet object. The cursor is what reads each row of your result set object. This exception will be thrown if you try to read from the result set when your cursor is not on a valid row. Your application may be crashing due to your handling of java.sql.exception. Read java api

http://java.sun.com/j2se/1.4.1/docs/api/java/sql/ResultSet.html for more information.

Also keep in mind that the Filemaker driver does not support most of the java 1.4 result set commands. This will throw error 803 i think.

  • Author
  • Newbies

I have made a Reply but I cannot understand

where is gone!!!

Let's try with a quick reply ....

I'm not sure to understand your question, Anatoli ...

I don't use scripts in the java side. They are executed only in FM side.

On the java the sql commands can be descripted as follows:

<START TRANSACTION>

<SELECT * FROM XXX>

<DELETE FROM XXX WHERE yyyy>

<DELETE FROM XXX WHERE zzzz>

<COMMIT TRANSACTION>

or

<START TRANSACTION>

<INSERT INTO XXXX ...>

<INSERT INTO XXXX ...>

<COMMIT TRANSACTION>

I think that the real java code contains no errors because

other databases are involved in this java application, and all works perfectly. Only the java code that use the FM database gives all these problems.

  • Author
  • Newbies

chrisonmaui,

I can show the java code ...

I think it's ok ... but never completely sure!!!

....

String cSQL = "INSERT INTO LW_astat auftragsnummer,astatnum,astatid,status) VALUES ('56923',10,0,1)

Connection conn = getConnection();

try {

Statement st = conn.createStatement();

LOTrace.SQL(cSQL);

st.executeUpdate(cSQL); ///here the and "invalid cursor state" error is thrown

st.close();

} catch(SQLException e){

LOTrace.error(e.getMessage());

throw e;

}

...

your code looks correct.

why dont you just set up a test pc running only the filemaker http service and not any scripts. then you can work out if it is the concurrent access causing the exception to be thrown?

  • Author
  • Newbies

I have my test environment.

It has absolutely no problems.

It's without the http service, because it doesn't support

trancastions.

I receive the error "Property not supported" if I try to start a transaction.

It's the english version with no FMServer.

  • 2 weeks later...

The SQL statement mentioned is not correct

It reads: String cSQL = "INSERT INTO LW_astat auftragsnummer,astatnum,astatid,status) VALUES ('56923',10,0,1)

and must be like:String cSQL = "INSERT INTO LW_astat (auftragsnummer,astatnum,astatid,status) VALUES ('56923',10,0,1)

So you'll have to add the "(" in front of your auftragsnummer

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.