Click to See Complete Forum and Search --> : Update error
alex1973
December 23rd, 1999, 04:27 AM
When I try to update a record I get the message:
"[Microsoft][ODBC Microsoft Access Driver] The search key was not found in any record". I'm using ADO and this message apears only when I modify a memo field which contains 500 chars.
What could be the problem? Please help me with some sugestions. Thanks
valkyrie
December 26th, 1999, 04:22 AM
Not sure about this, but it is best to find out the limitation of Access on the number of characters allowed for a field. As I recall, I think for text fields (the text datatypes) the limit is 255 characters... so check it out with Access first!
Hope this points you in the right direction for debugging purposes...
____________________________________
The VB Bugs in my Life...
alex1973
December 27th, 1999, 12:10 AM
Thanks, but it's not that. I have a memo field which can hold up to 32K of char. The corresponding field in the form is a multiline TextBox.
I'm really blocked now.
December 28th, 1999, 12:41 AM
try cheking whether the field names are correct,table name is correct and whether ur odbc is installed properly..
ufo
December 28th, 1999, 02:19 AM
Try to use GetChunk/AppendChunk method. They are designed for work with MEMO fields.
[ufo]
alex1973
December 29th, 1999, 02:27 AM
That's a good idea. I'll try it.
Thanx.
alex1973
December 29th, 1999, 04:13 AM
It didn't work. I receive the same message. Any other idea?
ufo
December 29th, 1999, 04:20 AM
What about primary key in your recordset ? Without primary key you can't update through recordset. Try to open recordset with column which is in background table as primary key.
[ufo]
alex1973
December 29th, 1999, 07:44 AM
I have a primary key. An AutoNumber. If the number of characters within the memo field in not larger than ?? (I didn't find out the limit), the update works OK. I tryed to update a record when the memo field had 1000 chars and it worked. But if the memo field has 2000 char and I erase one char even, the update doesn't work. Also I don't have the problem when I add a new record. Even if the memo field has 15000 chars.
I hope is not a bug in the driver. I searched for the error message at microsoft.com and I didn't find it.
I'm desperate.
alex1973
January 3rd, 2000, 04:24 AM
All of that is correct. The update works OK if the fields has, let's say, 100 characters.
Thanx anyway. Any other idea?
ufo
January 3rd, 2000, 10:14 AM
OK, send me some more information and I will see what to do.
1. connection string ?
2. version of MDAC on your machine ?
However, I can ask some people from private beta newsgroup regarding this and if it's bug I will have patch or something.
[ufo]
alex1973
January 4th, 2000, 03:35 AM
lConnection.CursorLocation = adUseClient
lConnection.ConnectionString=PROVIDER=MSDASQL;dsn=find2;uid=;pwd=;
adoPrimaryRS.Open sqlString, lConnection,
adOpenDynamic, adLockPessimistic
I use Microsoft ActiveX Data Objects 2.1 Library.
On the form I have a multiline TextBox with the DataField property set to my database memo field.
Thank you again for your help.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.