| Bug #9767 | Updating Recordsets via ADO | ||
|---|---|---|---|
| Submitted: | 8 Apr 2005 16:21 | Modified: | 14 Jun 2013 10:56 | 
| Reporter: | Jay Alverson | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / ODBC | Severity: | S3 (Non-critical) | 
| Version: | 4.1/3.51 | OS: | Windows (Windows) | 
| Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any | 
   [8 Apr 2005 16:21]
   Jay Alverson        
  
 
   [8 Apr 2005 16:37]
   MySQL Verification Team        
  Could you please show a test case like was done in bug: http://bugs.mysql.com/bug.php?id=9009 this makes easy to understand and test the bug report. Thanks in advance.
   [11 Apr 2005 15:56]
   Jay Alverson        
  #include "C:\Test\MySQL\MySQLFunctions.wbt"
#include "C:\Test\MySQL\MySQL ADO Config.wbt"
DSN = "MySQLTest"
DBASE = "test"
MySQLADOSetup()
rs = ObjectCreate("ADODB.Recordset")
sqlstr = "select * from  FileTable order by 1 asc"  ;<-- select all fields/records...
;
rs.Open(sqlstr, cConn, 1,4,1)  ;<-- doesn't matter what combo 
;											of cursor/rec locking you use...
;
clipput("")
while !rs.eof
	for x = 0 to rs.fields.count-1
		message(x, rs.fields(x).name)
		clipappend(strcat("Field ", x, "-- ", rs.fields(x).name, @crlf))
	next
	rs.fields(2).value = 577  ;<-- update a field WITH NO SPACE in the column name
	rs.updatebatch()
	rs.movenext
endwhile
rs.close
;
rs = 0
DB = 0
message("Debug", "Done")
;
exit
Output of the field names
Field 0-- FileName
Field 1-- SizeOfDLL
Field 2-- DateOfDLL
Field 3-- Owner Of DLL
Here's the limited debug output from my script...
[COM Exception]
Microsoft OLE DB Provider for ODBC Drivers=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 'Of DLL='New Owner' WHERE (FileName='6to4svc.dll' 
AND SizeOfDLL=35840 AND DateOfD' at line 1
[COM Sub-system]
Function=InvokeMember
ErrorCode=9 (0x80020009)
ErrorDesc=Exception occurred.
If you go to MySQLQueryBrowser or use the command line utility and change the 
field  `Owner Of DLL` to `OwnerOfDLL` (remove spaces) it works fine.
 
   [11 May 2005 23:00]
   Bugs System        
  No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
   [31 May 2013 7:43]
   Bogdan Degtyariov        
  this bug needs to be re-checked
   [14 Jun 2013 10:56]
   Bogdan Degtyariov        
  VB test case\
Attachment: test9767.vbs (application/octet-stream, text), 771 bytes.
   [14 Jun 2013 10:56]
   Bogdan Degtyariov        
  VB test case
Attachment: test9767.vbs (application/octet-stream, text), 771 bytes.
   [14 Jun 2013 10:56]
   Bogdan Degtyariov        
  The test case works well with MyODBC 5.2.5. The problem probably was fixed ages ago. Closing the bug.
