Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Red face Unanswered: about FileMaker JDBC Driver

    Hi,

    I've got a Filemaker Developer 6.0 and I'm trying to access through JDBC.
    I have a problem that I can't get "Relationship" through JDBC.
    I want to get value from related fileds in other fp5 files.

    To examin this, I've created 2 "fp5" files as follows:
    ------------------------------------------
    File Name : "relation1.fp5"
    Field1(DataType:TEXT)

    File Name : "relation2.fp5"
    RelField1(DataType:TEXT)
    RelField2(DataType:TEXT)

    Defined Relation in "relation1.fp5"

    RelationName: [relA]
    Relation: [Field1 = ::Rel2Field1]
    Related File: [relation2.fp5]
    ------------------------------------------

    Testing this connection seems to work, in that I can see the table names, and even actual record data when I test a "SELECT *" query.

    However, it seems that "getRelationship" and "isRelated" methods doesn't work.

    Connection con = DriverManager.getConnection("jdbc:fmpro:http://localhost:","id","password");
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery("SELECT * FROM \"relation1.fp5\"");

    //get ResultSetMetaDataExt from "rs"
    rsMetaDataExt = (ResultSetMetaDataExt)rs.getMetaData();

    while(rs.next()){
    if (rsMetaDataExt.isRelated(i) == true){
    System.out.println(rsMetaDataExt.getColumnName(i)
    + "is related!");
    }else{
    System.out.println(rsMetaDataExt.getColumnName(i)
    + "is not related!");
    }
    }

    I think the result in console shows "Filed1 is related!", but it doesn't...
    That is to say, "rsMetaDataExt.isRelated(i) == false".

    Has anyone else had this problem? Has anyone discovered why it happens, where the problems lies, etc.

    What's the go?

    Thx,

  2. #2
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    To access to Related data and portal you will need to use Array interface from com.fmi.jdbc which is not a standard jdbc interface

    com.fmi.jdbc.Array Tableau = (com.fmi.jdbc.Array) ResultSet.getObject(object number)

    So you can get the related data in a string array
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  3. #3
    Join Date
    Feb 2004
    Posts
    84

    Re: about FileMaker JDBC Driver

    THere are severl thrid party products that extended the FileMaker JDBC drivers, but I normally syncronize my tables one by one and then do the realtionships in FileMaker. I realize that data set size is sometimes too large for this appraoch, but for many projects it keeps me from having to purchase other products.

    Thanks,

    Joe



    Originally posted by saishin
    Hi,

    I've got a Filemaker Developer 6.0 and I'm trying to access through JDBC.
    I have a problem that I can't get "Relationship" through JDBC.
    I want to get value from related fileds in other fp5 files.

    To examin this, I've created 2 "fp5" files as follows:
    ------------------------------------------
    File Name : "relation1.fp5"
    Field1(DataType:TEXT)

    File Name : "relation2.fp5"
    RelField1(DataType:TEXT)
    RelField2(DataType:TEXT)

    Defined Relation in "relation1.fp5"

    RelationName: [relA]
    Relation: [Field1 = ::Rel2Field1]
    Related File: [relation2.fp5]
    ------------------------------------------

    Testing this connection seems to work, in that I can see the table names, and even actual record data when I test a "SELECT *" query.

    However, it seems that "getRelationship" and "isRelated" methods doesn't work.

    Connection con = DriverManager.getConnection("jdbc:fmpro:http://localhost:","id","password");
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery("SELECT * FROM \"relation1.fp5\"");

    //get ResultSetMetaDataExt from "rs"
    rsMetaDataExt = (ResultSetMetaDataExt)rs.getMetaData();

    while(rs.next()){
    if (rsMetaDataExt.isRelated(i) == true){
    System.out.println(rsMetaDataExt.getColumnName(i)
    + "is related!");
    }else{
    System.out.println(rsMetaDataExt.getColumnName(i)
    + "is not related!");
    }
    }

    I think the result in console shows "Filed1 is related!", but it doesn't...
    That is to say, "rsMetaDataExt.isRelated(i) == false".

    Has anyone else had this problem? Has anyone discovered why it happens, where the problems lies, etc.

    What's the go?

    Thx,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •