This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am trying out this product by following the tutorial video. I am able to connect to the local mySQL database, and retrieve the rows in the table. However, I couldn't update changes back to the database. Below is my test code which is pretty much similar with tutorial. If I executed on the "Test read" part, it is working. But when I include the "Test write" part, it is throwing exception at this line: uow.Add(status); My table name is "Status". So, it supposes to access iconicdb.Status instead of iconicdb.keytable?
|
|
|
When you add a new entity, LightSpeed needs to assign that entity an ID. There are various options for doing this, but the default is one called KeyTable. The KeyTable method depends on having a table in the database containing the next ID to allocate: by default, this table is called KeyTable. It is this "id allocation" table that LightSpeed is looking for when this error occurs. For more information about KeyTable and other identity generation options, see: To create the key table, run the KeyTable.sql script for your database. You can find this script in the installation directory (under Providers/MySQL5). |
|
|
Thanks Ivan. Problem solved. Both read and write are working fine. |
|