Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

JAVA - ODBC - FILEMAKER


fape

This topic is 7838 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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 ??

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

  • 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;

}

...

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

This topic is 7838 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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