07-21-2008, 9:01 PM
|
wasuplee123
Joined on 06-04-2008
Posts 8
|
Re: New version of MySQL Connector/ODBC
|
 
 
|
|
|
Thanks for all your help so far, here and in the emails.
We're using MySQLDAC (http://www.microolap.com/products/connectivity/mysqldac/) as our data provider in Delphi instead of ODBC. However in Code Auto, we are still using ODBC.
We noticed a problem with auto increment fields...
1) In Code Auto it doesn't show anything checked in the "AutoInc" field, even though the primary key field in our table is defined as autoincrement. (This is not really important, because I know how to modify the code generator and make all my primary key fields also be autoincrement in the "Info" file that is generated.)
2) Whenever I create a new ORM object and save it, it doesn't load the autoincrement field that was generated. For example:
---
Order = TOrder.Create(ObjectManager);
Order.Name = "Test";
Order.Save;
// Here Order.ID should not be 0, but it is
Assert(not (Order.ID = 0));
---
I tried calling Order.Refresh() but it also doesn't work. I have a function that will give me the value of the last inserted ID in MySQL, but I don't know where I should call that function in our Data Provider so that auto increment fields will get updated after saving.
Thank you.
|
|
|
|
|
Report
|
|
|
|