April 12, 200322 yr 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 ??
April 12, 200322 yr 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?
April 13, 200322 yr 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.
April 13, 200322 yr 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.
April 13, 200322 yr 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; } ...
April 13, 200322 yr 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?
April 13, 200322 yr 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.
April 22, 200322 yr 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