gdurniak Posted February 20, 2012 Posted February 20, 2012 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
wbasham Posted February 21, 2012 Posted February 21, 2012 This feature should work. Are you getting an "ERROR" returned when calling the function? If so, what is the result of jdbcLastError?
gdurniak Posted February 24, 2012 Author Posted February 24, 2012 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
gdurniak Posted February 27, 2012 Author Posted February 27, 2012 ( 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
wbasham Posted February 27, 2012 Posted February 27, 2012 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.
wbasham Posted February 28, 2012 Posted February 28, 2012 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?
gdurniak Posted March 3, 2012 Author Posted March 3, 2012 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
Recommended Posts
This topic is 4650 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 accountSign in
Already have an account? Sign in here.
Sign In Now