Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm doing this in Java at the moment using JDBC. You need to import the JDBC driver and MySQL into your library. I'm currently looking in my other posts for the best practices to processing this large amount of data.</p> <p>You might have to make the tables yourself in MySQL, and I might go as far as to recommend it, because FMPro typically has a strange setup, that you might not want to copy exactly (I noticed on the most recent one text fields have to be set to a length too or things just go haywire..). An easy afternoons work in MySQL Developer (or whatever they call it now) drawing some nice diagrams?</p> <p>Here's some cheats: </p> <pre><code>public static String dbaseURL = "jdbc:filemaker://machineIP:2399/database"; public static void FMProConnect() { // Load the JDBC to ODBC driver try { Class.forName("com.filemaker.jdbc.Driver"); } catch(java.lang.ClassNotFoundException e) { System.err.print("ClassNotFoundException: "); System.err.println(e.getMessage()); } } public static void copyTable(){ FMProConnection.FMProConnect(); Connection dbConnection = null; Statement query = null; PreparedStatement stmt = null; try { // Create a database connection dbConnection = DriverManager.getConnection(dbaseURL, "fmprouser", "fmpropassword"); // Create a statement and execute the SQL query query = dbConnection.createStatement(); } catch (SQLException e) { System.out.println("Error connecting to dbase."); e.printStackTrace(); //System.exit(1); } ResultSet results = null; try { results = query.executeQuery("SELECT * from table"); // Iterate through the results and print them to standard output Connection con = DriverManager.getConnection("jdbc:mysql://mysqlserver.com/database","username","password"); while (results.next()) { String fname = results.getString("field"); String lname = results.getString("field1"); // System.out.println("Found user \"" + fname + " " + lname + "\""); stmt = con.prepareStatement("INSERT ignore INTO table (field, field1 values (?, ?)"); stmt.setString(1, fname); stmt.setString(2, lname); stmt.executeUpdate(); } System.out.println("Completed Customers"); } catch (SQLException e) { System.out.println("Error retrieving data from database."); e.printStackTrace(); //System.exit(1); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload