Hi everybody!
I have the following problem: I have many tables in my database and for
some columns it happens that when I try to update them, I get the error
message, that the update doesn't work properly, because of "Key column
information insufficient or incorrect". This happens only for a few
columns in the table.
Example:
Table "tabProductColorPackage"
ID (INT, AutoSeed, Pkey)
Number (DECIMAL(18,2))
Unit (DECIMAL(18,2))
My VB-Code:
Recordset.Open "SELECT Unit FROM tabProductColorPackage WHERE ID=2"
Recordset.Fields("Unit") = 1
Recordset.Update
--> Works fine!
Recordset.Open "SELECT Number FROM tabProductColorPackage WHERE ID=2"
Recordset.Fields("Unit") = 1
Recordset.Update
--> Produces the error given in my description.
What the hell is going wrong here?
Thanks in advance,
BerndHi!
Sorry, the VB-Code that produces the error is as follows:
> Recordset.Open "SELECT Number FROM tabProductColorPackage WHERE ID=2"
> Recordset.Fields("Number") = 1
> Recordset.Update
Thanks,
Bernd
No comments:
Post a Comment