Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: problem with odbc connectivity and mysql relation

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    8

    problem with odbc connectivity and mysql relation

    Good morning, i have established a connection to my database MySQL with ODBC, now i try to established some relations (not the relations between the key field, i need to do a relation one to many) between the grids but i have some difficulties so i need to know what is the best practice to do this one.

    Thank you,
    Simone

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    In the section attributes there is an attribute "Automatically relate".

    If this is unchecked then you can requery() the Virtual Table in the "ParentDataChanged" delegate.

    Code:
    ca = cursorAdaptor("the_alias_of_your_virtual_table")
    ca.requery("amount > 0 and customer='{customers.name}'")
    Lianja.getElementByID("id_of_your_grid").refresh()
    Notice how i reference the parent section data using the {customers.name} macro which will be expanded in requery().

    After requerying the MySQL data you then refresh() the grid by accessing it using Lianja.getElementByID().

    Once your grid is refreshed, Lianja will then cascade the sections relationships down the page.

    Now after telling you all that, unfortunately the "Automatically relate" attribute was disabled in RC8 but it is available in the latest RC9 build. Assuming you are on Windows we can make this available to you. If you are on linux you will need to wait for it.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Junior Member
    Join Date
    Sep 2013
    Posts
    8

    Mysql

    Quote Originally Posted by barrymavin View Post
    In the section attributes there is an attribute "Automatically relate".

    If this is unchecked then you can requery() the Virtual Table in the "ParentDataChanged" delegate.

    Code:
    ca = cursorAdaptor("the_alias_of_your_virtual_table")
    ca.requery("amount > 0 and customer='{customers.name}'")
    Lianja.getElementByID("id_of_your_grid").refresh()
    Notice how i reference the parent section data using the {customers.name} macro which will be expanded in requery().

    After requerying the MySQL data you then refresh() the grid by accessing it using Lianja.getElementByID().

    Once your grid is refreshed, Lianja will then cascade the sections relationships down the page.

    Now after telling you all that, unfortunately the "Automatically relate" attribute was disabled in RC8 but it is available in the latest RC9 build. Assuming you are on Windows we can make this available to you. If you are on linux you will need to wait for it.


    I see that there is the checkbox "automatically relate" but is disabled, i can not change and uncheck the box.... ok i'm waiting but what i can do?
    Last edited by djtropez; 2013-09-10 at 04:02. Reason: correction

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Quote Originally Posted by djtropez View Post
    I see that there is the checkbox "automatically relate" but is disabled, i can not change and uncheck the box.... ok i'm waiting but what i can do?
    Yes as I mentioned:

    "Now after telling you all that, unfortunately the "Automatically relate" attribute was disabled in RC8 but it is available in the latest RC9 build. Assuming you are on Windows we can make this available to you. If you are on linux you will need to wait for it."
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Junior Member
    Join Date
    Sep 2013
    Posts
    8
    Assuming you are on Windows we can make this available to you.


    What does it means.... i'm sorry but i don't understand so much the english.....i'm in windows you can activate this option for me?

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    If you are running Lianja on Windows, we can give you access to the RC9 beta. This enables "Automatically relate" allowing you to check or uncheck this checkbox.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Junior Member
    Join Date
    Sep 2013
    Posts
    8
    Yes i have windows... what i have to do i can hav the access? thank you very much i have to developpe an application opensource for the university and i like to use lianja for this.... thank you

  8. #8
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    Hi,

    You can access this build now from Downloads/Windows/beta.

    Regards,

    Yvonne

  9. #9
    Junior Member
    Join Date
    Sep 2013
    Posts
    8
    thank you so much, i will send you a report if will be some problems!
    Best regards, Simone

  10. #10
    Junior Member
    Join Date
    Sep 2013
    Posts
    8
    Good Morning i'm unchecked the automatically related. Now i have two tables in the second one i insert the relations. In the parent i insert the "id"(keyword) of the first table , in the child i insert a numeric fields to have a relation one to many with the firs table but it doesn't work... when i create the relation the data are not related and when i change the value in the first table nothing change in the second table.... can someone can tell me if i make a mistake???

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us