|
-
Oct 17th, 2006, 01:30 AM
#1
Thread Starter
New Member
[RESOLVED] DataGrid Problem
Hi all,
I make a simple form in VB6 to input / edit Personal data.
I use one Adodc and some commandbutton and text box.
Everything is ok ( I can Add new, cancel , edit, etc).
Then I add a Datagrid to the form only to show ID and Name.
I use one Adodc for all of them.
Everything is ok, except one :
If I add a new record ( adodc1.recordset.addnew), then
I cancel it ( adodc1.recordset.cancelUpdate ) , an error message appear :
... they would create duplicate value in index, primary key ........
My database have primary dan index, but in this case I don't make any new record.
Can anyone please tell me how to avoid this error ?
Thank you
Rudy Ong
-
Oct 17th, 2006, 01:46 AM
#2
Re: DataGrid Problem
What is the Cursor Type You are Using?
-
Oct 17th, 2006, 01:51 AM
#3
Thread Starter
New Member
-
Oct 17th, 2006, 02:03 AM
#4
Re: DataGrid Problem
Try the lock type as LockBatchOptimistic
-
Oct 17th, 2006, 02:06 AM
#5
-
Oct 17th, 2006, 02:20 AM
#6
Thread Starter
New Member
Re: [RESOLVED] DataGrid Problem
Thank you.
It is working now.
Rudy Ong
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|