Hey,
I'm using CRecordSet to add new rows to some table.
The Sequence of operations is as following:
m_recSet->Open();
m_recSet->AddNew();
m_recSet->Update();
In the AddNew() function i'm getting an Exception Saying "Recordset is read-only".
I saw in previous posts that this problem is caused when there is no Primary Key, but, my table
does not have a Primary Key and i don't want to set one.
How can i add rows to a table that doesn't have Primary Key ?
Thank
Shahar
On http://www.thescripts.com/forum/thread82452.html I see the same problem being discussed. Is there a reason why you don't want a primary key on the table?
Thanks
Waseem
|||The reason is as simple as there is no single primary key, i don't want to disable duplicate rows, and even if i'll compromise on that
i'll need to create Primary Key that will include 5 Fields, which as i see it won't be very efficient.
|||Perhaps you 'could' add an IDENTITY column to the table.
Waseem Basheer - MSFT wrote:
On http://www.thescripts.com/forum/thread82452.html I see the same problem being discussed. Is there a reason why you don't want a primary key on the table?
Thanks
Waseem
No comments:
Post a Comment