Results 1 to 5 of 5

Thread: Virtual table using MYSQL

  1. #1
    Member
    Join Date
    May 2012
    Posts
    94

    Virtual table using MYSQL

    Hello, or testing purpose, I create a little table on a local MYSQL.
    Then an ODBC connect.
    In Lianja, I create a virtual table from it.
    No problems, I see the the table and in the command box I can use and browse it.
    Now I can append records on it, no problem.
    But when I put data in it, on every enter it gives;

    Failed to update the record. Record may have been changed by another user.

    What could cause this problem ?

  2. #2
    Lianja Support Team lianjasupport's Avatar
    Join Date
    Feb 2012
    Location
    Boston USA, Wokingham UK
    Posts
    1,268
    SET DEBUG ON and look in debug_client.txt

    You probably need to exclude autoinc fields in the VT definition.

  3. #3
    Member
    Join Date
    May 2012
    Posts
    94
    How do I alter a virtual table ?

    alter table vt_test drop column id does not work. (also on other fields)
    If I try to alter the table in the table section I get: table cannot reload from the backup

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,739
    It is better to alter the virtualtable through the GUI.

    Alternatively you can use alter virtualtable NOT alter table.

    You cannot drop a column from a virtualtable, you must specify the column list in the sql select or exclude autoinc columns.
    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
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,371
    (Was too slow with this but will post as it has a couple of doc links)

    Hi Snelsoft,

    Virtual tables use the ALTER VIRTUALTABLE command and the corresponding CREATE VIRTUALTABLE command. From the Data Workspace, you can also use 'Modify virtual table...' from the 'Additional commands' under Tables.

    If you want to modify the columns, you need to change the 'SQL command' for the virtual table. In the CREATE/ALTER VIRTUALTABLE commands, this is the 'AS <select statement>' clause.

    Regards,

    Yvonne

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