Jump to content

john renfrew

  • Content Count

  • Joined

  • Last visited

  • Days Won


john renfrew last won the day on October 17

john renfrew had the most liked content!

Community Reputation

35 Excellent

About john renfrew

Profile Information

  • Gender
  • Location

Contact Methods

  • Website URL
  • Skype

FileMaker Experience

  • Skill Level
  • FM Application
    16 Advanced

Platform Environment

  • OS Platform
  • OS Version

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ryan changed the default memory size to 512 and it has worked 3 times and then crashed on the 4th....
  2. Bailey... beachballs straight away on mine MBP17" 10.12.6 FMP 17.0.2 and latest SM Over the years the Swing stuff has given the most problems, apart from some of the really edge case stuff I have done...
  3. john renfrew

    MS sqlserver just got easier

    And for this of you that have read all the way to the bottom....... We can also use this with FileMaker JDBC!!! The parts you need to change are import com.filemaker.jdbc3.J3SimpleDataSource and db = [server:'myserver', port:2399, databaseName:'database', username:'user', password:'pass'] and ds = new J3SimpleDataSource() you do need the file to be shared with JDBC/ODBC and a user account with access privileges.
  4. john renfrew

    MS sqlserver just got easier

    apologies: return '{"error":-1,"error_message":e.getMessage()} is missing a final quote and some + signs, should be return '{"error":-1,"error_message":' + e.getMessage() + '}'
  5. john renfrew

    MS sqlserver just got easier

    UPDATE If you want to the same things with the mysql-connector-java-8.0.12.jar from MySql https://dev.mysql.com/downloads/connector/j/8.0.html the you need to change just three lines in the above import com.mysql.cj.jdbc.MysqlDataSource and db = [server:'servernameorip', port:3306, databaseName:'name', username:'user', password:'pass'] and ds = new MysqlDataSource()
  6. john renfrew

    Getting Error #13 for BaseElements Plugin

    Have you tried inserting it fro URL using the file:/// protocol???
  7. john renfrew

    Export Container doesn't work on FMServer

    There is an issue which I know that 360works are aware of and working to fix with this version to do with the fmpro.getContainerStream method.... It's tricky because some older versions, which do work, might not load properly on Server 17 - those might be fine on FMS16.. Don't think it will be too long before there's a fix.
  8. john renfrew

    Export Container doesn't work on FMServer

    which version of SM???
  9. As promised... With the new ScriptMaster which uses a sandboxed JVM it is now possible to load driver jars at runtime, whereas before they had to be installed in the Java/Ext folder This makes a function to tak to MS sql server possible. Sample code below... Get the jar file referenced from the Microsoft website. As this is from some production code we are using record as the column name for the record index, and the data comes back pipe delimited, but you easily change those... If you leave the find blank it will just return the id of the first record in the list. if you UPDATE it should return the number of rows affected, and hopefully if you INSERT it will give you an array of the record ids that were inserted - use at your own risk obviously... test, test, test. // MS_SQL( fm_query ; fm_find? ) // v4.5 // 18_10_14 JR // performs SQL query on MSsqlserver database and returns fm_find | record // fm_query is SQL statement e.g. SELECT * FROM Table // fm_find{optional} is list of field names to return in answer, and adds 'record' as last value - pipe delimited // requires mssql-jdbc-7.0.0.jre8.jar - this can now be loaded at runtime // assumes a column called 'record' as the ID import groovy.sql.Sql import java.sql.Statement import com.microsoft.sqlserver.jdbc.SQLServerDataSource t1 = System.currentTimeMillis() //edit this for your solution IDX = 'record' db = [server:'servernameorip', port:49513, databaseName:'name', username:'user', password:'pass'] ds = new SQLServerDataSource() ds.setUser(db.username) ds.setPassword(db.password) ds.setServerName(db.server) ds.setPortNumber(db.port) ds.setDatabaseName(db.databaseName) sql = ds.getConnection() Statement stmt = sql.createStatement() answer = al = ex = '' sqlt = fm_query[0..2].toUpperCase() try { if(sqlt == 'UPD') { //update ex = stmt.executeUpdate (fm_query) } else if(sqlt == 'INS') { //insert ex = stmt.executeUpdate(fm_query) } else { //select ex = stmt.executeQuery(fm_query) } //end if } catch (e) { return '{"error":-1,"error_message":e.getMessage()} } //end try if(sqlt == 'INS' || sqlt == 'UPD') { //insert or update sql.close() return ex } else { if(!fm_find) { //default find is 'record' id of first returned answer ex.next() answer = ex.getString(IDX) } else { sqlFind = fm_find.tokenize('\n') while (ex.next()) { for (i in 0..<sqlFind.size()){ //pipe delimited, change last character for \t etc. al = al + ex.getString("${sqlFind[i]}") + '|' }// end for answer = (answer? answer + '\n' : '') + al + ex.getString(IDX) al = '' } //end while } //end if } //end if sql.close() if(!answer) { return '{"error":-1,"error_message":"empty set"}' } else { t1 = System.currentTimeMillis() - t1 } //end if return answer.trim()
  10. john renfrew

    getContainerStream throws error on FMS16

    It is an issue that 360works are aware of, and as I far as I know working on... It affects my work quite significantly, especially now that the older versions do not install on FMS!7
  11. john renfrew

    Xades-EPES signature script for Groovy

    Thanks... will have a look when I have a few moments.
  12. john renfrew

    Xades-EPES signature script for Groovy

    can you post some links Ibrahim??
  13. john renfrew

    unhelpful error message dialog

    Hi Sean I spoke to Jesse about this at Devcon, and he understood the change in behaviour and I *think* the dev version of the plugin I have fixes this...
  14. john renfrew

    Numpty advice re scriptmaster

    this won't work with a path that starts filemac: It needs to be an O/S system path, and while I know its not that helpful, works here (although I might have tweaked my version of the function a bit)
  15. john renfrew

    Numpty advice re scriptmaster

    set a variable in a script with the calculation - TheFunction( $params...) remember that this needs to be proper O/S paths

Important Information

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