none
MySQL Query problem with VB.net RRS feed

  • Question

  • Hi,

    I'm getting this error in my eventviewer 

    #HY000Illegal mix of collations for operation ' IN '

    My application is a window service, trying to query in MySQL.
    the SQL statement is..

    DELETE FROM tableA WHERE software not in ('', '360安全卫士', 'Adobe Flash Player ActiveX', '招行专业版', '招商银行一网通网盾', 'Intel(R) Graphics Media Accelerator Driver', 'Microsoft Internationalized Domain Names Mitigation APIs', 'Microsoft National Language Support Downlevel APIs', 'Pdf995', 'PdfEdit995', 'QQ2008 正式版', 'QQ工具栏', 'QQ游戏', 'Signature995', 'Microsoft .NET Framework 2.0 Service Pack 1', 'Symantec Endpoint Protection', '×Ϲ⻪ÓîÆ´ÒôÊäÈë·¨V6.1', '拍拍看 1.10') AND machineid = 109

    I copied and paste this statement into MySQL directly, and there is no error.

    any solution for this?


    Thanks
    Elvin
    Tuesday, November 4, 2008 3:29 AM

Answers

  • Hi all,

     

    thanks for reading and helping me out.

     

    finally fixed it.

    I was wondering why it works on my standalone (on my PC with mysql 5.0) and not in my window services

    and I found out that I have yet to change my server's mysql (where my window services is running) from latin1 to utf8.

    especially the forced column as latin1 (mysql 4.1)

     

    Tuesday, November 4, 2008 8:09 AM

All replies

  • If it is in .net, it might not recognize the character strings. If mySQL likes it...write a stored procedure.

     

    A.D.T.

    Tuesday, November 4, 2008 4:16 AM
  • yes, it is in VB.net

     

    infact, i set the connection to utf8.

    and most of the chinese characters went thru, I think im having problem with just this...

    maybe cause of the '×Ϲ⻪ÓîÆ´ÒôÊäÈë·¨V6.1',

     

    any solution?

    Tuesday, November 4, 2008 5:33 AM
  • weird, even w/o that unknown character V6.1

     

    DELETE FROM tableA WHERE software not in

    ('', '中信网银安全升级包 v1.0.0.1', 'LiveUpdate 3.3 (Symantec Corporation)', 'M&W eKey Driver(V2.7)', 'WinRAR archiver',

    'DameWare Mini Remote Control Client Agent Service', 'Google Toolbar for Internet Explorer', 'WebFldrs XP', 'WatchData USB Driver', 'Adobe Reader 8.1.2 - Chinese Simplified', 'Google Toolbar for Internet Explorer', '涉外企业所得税申报系统', 'Realtek AC`97 Audio', 'Symantec Endpoint Protection', '营业执照电子副本驱动程序2.0', 'HDuKeyCI800')

    AND machineid = 106

     

    I still got error with this one..

    Tuesday, November 4, 2008 6:23 AM
  • Hi all,

     

    thanks for reading and helping me out.

     

    finally fixed it.

    I was wondering why it works on my standalone (on my PC with mysql 5.0) and not in my window services

    and I found out that I have yet to change my server's mysql (where my window services is running) from latin1 to utf8.

    especially the forced column as latin1 (mysql 4.1)

     

    Tuesday, November 4, 2008 8:09 AM