Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Cant delete a record

Author  Topic 

zamaan
Starting Member

19 Posts

Posted - 2006-01-01 : 03:18:37
Hello i am new to MS SQL. Just moved in from MS Access.
I used to program in VB6.

mY Question is when i attemp to delete a record the followin error message displays

"Key column information is insufficiant or incorrect.Too many rows were affected by the update."

I have put the as code for the 'DELETE Record' command button in VB6 as follows.

adomain.Recordset.Delete adAffectCurrent

Please help me to safley delete a record from the SQL database using VB6.

Norwich
Posting Yak Master

158 Posts

Posted - 2006-01-04 : 10:54:10
Hi

Please give us more info

If you want your computer to be faster then throw it out of the window.
Go to Top of Page

kid_on_the_block
Posting Yak Master

172 Posts

Posted - 2006-01-04 : 13:39:53
Does the table have a primary key , it seems like you dont ...
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-04 : 23:55:02
There may be duplicate rows as your table doesnt have Primary key

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

zamaan
Starting Member

19 Posts

Posted - 2006-01-05 : 11:14:42
Thanks every body.

Yes. it seems the problem with the Primary key. Actually i did not have a primary key. Now the problem seems disapeared.
Going well

zamaan
Go to Top of Page
   

- Advertisement -