February 20, 201213 yr I tried adding the suggested "timeout=30" to my jdbcPerformQuery, and it fails I tried it enclosed in quotes, and not is this feature available? thanks greg
February 21, 201213 yr This feature should work. Are you getting an "ERROR" returned when calling the function? If so, what is the result of jdbcLastError?
February 24, 201213 yr Author Sorry, I didn't explain it correctly In Manage Scripts, it tells me "too many parameters", as if the feature did not exist I have version 1.66 Thanks PS OK, I see it now. I had to upgrade to 1.77 Question: If it Times Out, does it return a specific "error" code? can I test for this? PS PS A Feature Request: please return the execution time, in milliseconds, so I can see slow queries Question: Is "Timeout" in seconds, or milliseconds? the documentation is not clear
February 27, 201213 yr Author ( Cont'd ) Timeout does appear to be in milliseconds, however, it did not appear to help We use Sybase SQL Anywhere v9 I ran a "slow" query, by mistake, and FileMaker just froze. The "timeout" made no difference
February 27, 201213 yr You are correct, the timeout should be in milliseconds. I've tested the function and the timeout parameter successfully using the sample file that comes with the plugin download. I was using a mySQL database but you should be able to reproduce this by setting the timeout for a really low number of milliseconds. The function should then timeout before jdbcPerformQuery finishes. Keep in mind that the timeout is related to the jdbcPerformQuery function call only. If there are results being iterated over using jdbcNextRow and jdbcGetValue it could take considerable time depending on the dataset. In this scenario, it may appear that FileMaker is hanging while it it processing the records. I had this situation in my test when the dataset returned 117,000+ rows. Keeping the timeout value low (i.e. 10ms), jdbcPerformQuery returned "ERROR." But when I moved it up to say, 4000, in my case that function worked successfully but FileMaker "hung" while the returned records were iterated over. If this still does not help, please contact me directly by email and I'll see what I can do to help you get it resolved.
February 28, 201213 yr The timeout sounds like it is working correctly for the jdbcPerformQuery function. Do you have other jdbc function calls in the script? That could be the source of the "hang" if so. Were you able to look at the log to see if the script was simply still processing the records that got returned?
March 3, 201213 yr Author The Plugin does have a log file, but not much help http://wo.360works.com/cgi-bin/support/productsupport.cgi/Plugin_log_files The log confirms that the query runs, the timeout occurs, and then nothing I only use the three basic functions, connect, query, and getvalue. The query is a SELECT AVG ( Number ), so it returns 1 value I contacted Sybase, and they suggest the plugin add a "cancel" command, and the end of the timeout The plugin works fine with queries that finish within the timeout
Create an account or sign in to comment