You hit the nail on the head when you asked about the missing primary
key. DataMgr does need a primary key in order to figure that stuff
out. It may or may not be an identity and can even be a compound
primary key, but without that it doesn't know when to insert and when
to update.
The insertRecord method should (in theory) work without a primary key.
The updateRecord method, however, will not as it doesn't know which
parts of the structure are the SET and which are the WHERE.
The updateRecords method (note the "s" at the end), should work fine:
http://www.bryantwebconsulting.com/docs/datamgr/update-multiple-records.cfm
I'll certainly work on improving the error message returned in this scenario.
Let me know if you need anything else.
Thanks,
Steve
On Fri, Oct 16, 2009 at 10:15 AM, DaveBurns <davebur...@gmail.com> wrote:
>
> Hi. I'm trying out DataMgr (version 2.2.0.2). I have an existing row
> in a table that I'm trying to update with:
>
> Application.DataMgr.saveRecord("mytable", info);
>
> I get the error:
>
> Cannot insert explicit value for identity column in table
> 'mytable' when IDENTITY_INSERT is set to OFF.
> There is no primary key