Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AutoIncrementPK and MySql
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01324875
Message ID:
01325259
Views:
15
Stuart,

>when I set the this.RetrieveAutoIncrementPK = true , it crashes at this point in the code.
>
>
>this.RowsUpdatedOnSave = dao.SaveDataSet(ds,
>tableName,
>PK,
>RetrieveAutoIncrement,
>dbAdapter);
>
>
>with the error
>
>When MySqlCommandBuilder.ReturnGeneratedIdentifiers is true,
>MySqlCommand.UpdatedRowSource must be set to None.
>
>
>
>This is connecting to MySql

I'm thinking you probably have to override the mySQL data access class's ConfigureInsertForAutoIncrement() method. If you have subclassed from mmDataAccessSQL, it contains code that appends the followingto the Insert command:
; Select SCOPE_IDENTITY() AS " + this.PrimaryKeyName; to the
It's possible that MySQL doesn't like this...

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform