1 message in com.mysql.lists.mysqlStrange EDIT/UPDATE behavior| From | Sent On | Attachments |
|---|---|---|
| John Manton | 11 Apr 2003 13:48 |
| Subject: | Strange EDIT/UPDATE behavior![]() |
|---|---|
| From: | John Manton (John...@BizzyBitz.com) |
| Date: | 04/11/2003 01:48:31 PM |
| List: | com.mysql.lists.mysql |
In performing a simple EDIT/UPDATE on an existing record, I stumbled upon a bizarre "feature". The process started with updating a single column using the .EDIT and .UPDATE
At first I could not get it to make the update to the field between my original field contents and the new content. No errors, it just failed to make a change. After several hours of frustration, I decided to try something different and the update worked. Basically, it appears that the update will fail if the original field contents are "similar" to the new field contents, although this is pretty subjective.
The table below shows the success/failures between the original and new contents.
Orig New Success? jemjem jemjemjem N jemjem jemjem1 N jemjem jem1jem N jemjem 1jemjem N jemjem 1jemjem1 N jemjem 1jem1jem1 N jemjem jemajem N jemjem ajemajema N jemjem jemjemjemjem N jemjem ajemajemabc N jemjem abcdefjem N jemjem jemabcdef N jemjem jemabc Y jemabc jemjem Y jemjem abcjem Y abcjem jemjem Y jemjem jenjen Y jenjen jemjem Y jemjem 123456 Y 123456 jemjem Y jemjem bembem Y bembem jemjem Y
The MySQL version is 4.0.12 The OS is W2K sp3 The code is VB6
Example code is: cnMySql.CursorDriver = rdUseOdbc cnMySql.Connect = ConnectInfo cnMySql.EstablishConnection
With rdoQry4 .Name = "selectNewPswd" .SQL = "Select * From users Where UserID = " _ & "'" & UpdateUserID & "'" .RowsetSize = 1 Set .ActiveConnection = cnMySql Set rdoRS = .OpenResultset(rdOpenKeyset, rdConcurRowVer) End With
Do Until rdoRS.EOF
With rdoRS .Edit !UserPSWD = NewPswd .Update rdoRS.MoveNext End With Loop
rdoRS.Close ======================================
I've searched the FAQ's, GOOGLED, and lurked this list for days... no similar reports that I can find. This was supposed to be a simple code module...
Anyone have ANY ideas?
Thanks! -J
¤º°`°º¤ø,¸BizzyBitz¸,ø¤º°`°º¤




