954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

error problem...plss see

this is the error i have...

key column information is insufficient or incorrect. to many rows were affected by update.


thx for viewing...

jaasaria
Junior Poster
123 posts since Jul 2007
Reputation Points: 10
Solved Threads: 1
 

i think it is in your .update.you have less fields that you have updated.Please post your code.

ryan_vietnow
Posting Pro
578 posts since Aug 2007
Reputation Points: 28
Solved Threads: 71
 

hi my friend... this my saverecord procedure...

Sub saverecord()

rssupplier.AddNew
rssupplier.Fields("CompanyCode") = txt1.Text
rssupplier.Fields("CompanyName") = txt2.Text
rssupplier.Fields("ContactPerson") = txt3.Text
rssupplier.Fields("Position") = txt4.Text
rssupplier.Fields("TelephoneNo") = txt5.Text
rssupplier.Fields("Address") = txt6.Text
rssupplier.Update

End Sub


thxxxxxxxxx...

jaasaria
Junior Poster
123 posts since Jul 2007
Reputation Points: 10
Solved Threads: 1
 

after an 2hour nothing have been change in my form..pls help

after i save a record the data was been save.
but when i end the run..
and run again the program..
the datagrid became null..

the record that i save was lost and only white lines left..
after i enter the command button continuesly the error appeared.

plssssssss plssssssss.......... somebody help me.........

jaasaria
Junior Poster
123 posts since Jul 2007
Reputation Points: 10
Solved Threads: 1
 

"key column information is insufficient or incorrect" error appears to suggest that your primary key field (whatever that may be) has either been left empty, or the contents of it is the same as a record already in your database.

Edit: on a google search, it is possible you have not included the Primary Key field in your recordset. This can also cause a similar error.

jonifen
Junior Poster
152 posts since Nov 2007
Reputation Points: 13
Solved Threads: 17
 

use this metod instead Update

UpdateBatch adAffectCurrent
Mbt925
Junior Poster in Training
63 posts since Dec 2007
Reputation Points: 10
Solved Threads: 5
 

Please try to look again in your datagrid maybe you missed about the name of the fields, may you lack in declaring some fields.

and about your code update...

rssupplier.AddNew
rssupplier.Fields("CompanyCode") = txt1.Text
rssupplier.Fields("CompanyName") = txt2.Text
rssupplier.Fields("ContactPerson") = txt3.Text
rssupplier.Fields("Position") = txt4.Text
rssupplier.Fields("TelephoneNo") = txt5.Text
rssupplier.Fields("Address") = txt6.Text
rssupplier.Update

I dnt see any rpoblem here but if this cause a problem then review your fieldnames.
1. how many fieldnames.
2. spelling of the fieldnames...

hope this will help you...

jireh
Posting Whiz
316 posts since Jul 2007
Reputation Points: 11
Solved Threads: 49
 

thxxxx for the reply thxx alot when i solved this i will give to all of you a reputation. heheh^_^

jaasaria
Junior Poster
123 posts since Jul 2007
Reputation Points: 10
Solved Threads: 1
 

i already check my table field but its all the same.

could somebody give me a site on error detection?
i will check it.
plsssssss give me any idea.. ]


thxxxxx .. thxxxxxxxxx

jaasaria
Junior Poster
123 posts since Jul 2007
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You