ADO and MySQL Error
am 17.12.2004 09:34:56 von Charles Metcalfe------=_NextPartTM-000-5566c85c-d6ce-49fd-9cc0-76423d1f10f2
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0028_01C4E424.0D6672F0"
------=_NextPart_000_0028_01C4E424.0D6672F0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
Christian Surya wrote:
=20
> I have a problem with VB6 SP6, ADO2.8 and MySQL database version 4.1.7 =
and
ODBC 3.51.10. i use Update function of the > recordset and it raise =
error
when update the database. the error is "Query-based update failed =
because
the row to > > > update could not be found."
> These error only occur if i want update data not insert.and the error
source is from ODBC engine. anyone can help me?
=20
=20
We use VB6 SP6, ADO2.8 and MySQL database version 4.1.7 and ODBC =
3.51.10.
and have had a similar problem and have found the cause to be as =
follows.
=20
If we SELECT a table into a recordset and the selected fields include =
TEXT
or DATE fields (we don=92t use BLOB fields) and any of the TEXT or DATE =
fields
contain NULL=92s then we always get the error "Query-based update failed
because the row to update could not be found." when we execute a =
recordset
update or updatebatch. The only way we have been able to overcome this
problem is to ensure that all TEXT and DATE fields contain a valid value
when creating the record.
We have opted to fill TEXT fields with vbcrlf (carriage return, line =
feed)
and DATE fields with =911000/01/01=92 on record creation.
=20
Hope this helps
=20
Charles
=20
=20
=20
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.809 / Virus Database: 551 - Release Date: 09/12/2004
=20
This email is confidential. It is intended only to be read or used by the addressee. If you are not the intended recipient you must not disclose or use the information contained herein. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete the message. Confidentiality is not waived by reason of mistaken delivery to any party other than the intended recipient.
------=_NextPart_000_0028_01C4E424.0D6672F0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3DWindows-1252">
style=3D'font-size:
10.0pt'>Hi,
style=3D'font-size:
10.0pt'>
style=3D'font-size:
10.0pt'>Christian Surya wrote:
style=3D'font-size:
10.0pt'>
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier New"'>> I have a =
problem with
VB6 SP6, ADO2.8 and MySQL database version 4.1.7 and ODBC 3.51.10. i use =
Update
function of the > recordset and it raise error when update the =
database. the
error is "Query-based update failed because the row to > > =
> update
could not be found."
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier New"'>> These error =
only occur
if i want update data not insert.and the error source is from ODBC =
engine.
anyone can help me?
style=3D'font-size:
10.0pt'>
style=3D'font-size:
10.0pt'>
style=3D'font-size:
10.0pt'>We use
New">
style=3D'font-size:10.0pt;font-family:"Courier New"'>VB6 SP6, ADO2.8 and =
MySQL
database version 4.1.7 and ODBC 3.51.10. and have had a similar problem =
and
have found the cause to be as follows.
style=3D'font-size:10.0pt;
font-family:"Courier New"'>
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier New"'>If we SELECT a =
table into a
recordset and the selected fields include TEXT or DATE fields (we =
don’t
use BLOB fields) and any of the TEXT or DATE fields contain NULL’s =
then
we always get the error "Query-based update failed because the row =
to update
could not be found." when we execute a recordset update or =
updatebatch.
The only way we have been able to overcome this problem is to ensure =
that all TEXT
and DATE fields contain a valid value when creating the =
record.
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier New"'>We have opted to =
fill TEXT
fields with vbcrlf (carriage return, line feed) and DATE fields with =
‘1000/01/01’
on record creation.
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier New"'>Hope this =
helps
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>Charles
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>
face=3D"Courier New">
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>
style=3D'font-size:
10.0pt'>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.809 / Virus Database: 551 - Release Date: 09/12/2004
This email is confidential. It is intended only to be read or used by the addressee. If you are not the intended recipient you must not disclose or use the information contained herein. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete the message. Confidentiality is not waived by reason of mistaken delivery to any party other than the intended recipient.
------=_NextPart_000_0028_01C4E424.0D6672F0--
------=_NextPartTM-000-5566c85c-d6ce-49fd-9cc0-76423d1f10f2
Content-Type: text/plain; charset=us-ascii
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
------=_NextPartTM-000-5566c85c-d6ce-49fd-9cc0-76423d1f10f2- -