Bug #38408 Error '80004005' - Can't update recoreds
Submitted: 28 Jul 2008 16:05 Modified: 28 Jul 2008 17:25
Reporter: Yarin Gaon Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.1.12-nt OS:Windows (Win 2003 Serv)
Assigned to: CPU Architecture:Any

[28 Jul 2008 16:05] Yarin Gaon
Description:
I have a serious problem.
I use UTF-8 AND Asp.
I'm tring to update a record using an ASP page, but I get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[MySQL][ODBC 3.51 Driver][mysqld-4.1.12-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Lock IS NULL AND MoreInfo='ìêçéêìçéìêçòëâã' AND System='2' AND PriceType IS NULL' at line 1 

/Systems/Constant/Delete.asp, line 21 

-----------------------------------------
Here is the Asp code I'm using:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ CodePage=65001 Language="VBScript"%>
<%
connectstr = "Driver={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=08;UID=YarinGaon;PWD=0045;Option=3;"

Set oConn= Server.CreateObject("ADODB.Connection")
oConn.Open connectstr 

yARIN =2

	  Set rsUseradd = Server.CreateObject("ADODB.Recordset")
	  rsUseradd.open "Contents Where ID = " & Yarin, oConn, 3, 3

	  rsUseradd.Update
  	  rsUseradd("Name")			=	"sdfsd"
	  rsUseradd.Update
	  rsUseradd.close
	  set rsUseradd = nothing

	  oConn.close
	  set oConn= nothing
	   
	  %>

I really don't know how to fix the problem.
It's the same in other tables.

Thanks.

How to repeat:
You can see the error on: http://yarin.epays.co.il/mysql/3.asp
[28 Jul 2008 16:54] MySQL Verification Team
Thank you for the bug report. Looks a syntax error with reserved words 'Lock', see:

http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html.

Thanks in advance.
[28 Jul 2008 17:14] Yarin Gaon
Thanks for you fast response, but it still do not work.

I did what you said, and changed the field name to "strLock", but then I get another error:
****************************************
Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[MySQL][ODBC 3.51 Driver][mysqld-4.1.12-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IS NULL AND LastNO IS NULL AND ExpireType IS NULL AND Cat IS NULL AND Width IS N' at line 1 
*******************************************

I did what you said, and searched the words: "LastNO" , "ExpireType", "Cat" and "Width" in the reserved words page, and they are not there.
[28 Jul 2008 17:19] Yarin Gaon
*******************************************

Never mind. Thank's for you response!
[28 Jul 2008 17:25] Yarin Gaon
Then again, I get another problem :-)
*******************************************
Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
Query-based update failed because the row to update could not be found. 
/Systems/Constant/Delete.asp, line 21 
********************************************************

This error does not make sense, because I know that the record is there, and the field ID is set to Index and Primery key.