As pointed out in another post, vfp doesn't support @@identity. I did some research on this and found that the vfpoledb provider version 9.0 does support "GETAUTOINCVALUE(0);" (version 8 doesn't). With the 0 parameter it is supposed to provide the exact same functionality as @@identity provided you call executescalar before closing the connection. So I added a KeepConnectionOpen protected property to the dbdatasourceitem class. In the UpdateRow function I added the line KeepConnectionOpen = True if loCommands(1) exists (we have autoincrementing table). In the internalexecutenonquery() function of the dbDataSourceItem class I check for that value so it won't allow it to close the connection if we have an autoincrementing field. After that I set KeepConnectionOpen = False. So far this seems to work.
Is there anything that I might have overlooked? It seems like a simple solution.
Thanks,
Marcel