List:MySQL and .NET« Previous Message
From:Scott Underwood Date:October 29 2004 1:09pm
Subject:New error with Beta 2
View as plain text  
I haven't seen this error before, at least not with the .76 version of
ByteFx or Beta 1.0 of the connector.  When I fill a dataset using
interfaces I get the following:

	#HY000Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation '='

The code that I'm using to fill the adapter is:

	Dim cmd As IDbCommand = lDbC.CreateCommand 'lDbC is an
IDbConnection object
      cmd.CommandText = SQL
      lDbA = lDf.GetDataAdapter 'lDbA is an IDbDataAdapter object
      lDbA.SelectCommand = cmd
      Dim ds As New DataSet
      If lDbC.State <> ConnectionState.Open Then lDbC.Open()
      lDbA.Fill(ds)
      If lDbC.State = ConnectionState.Open Then lDbC.Close()
      If ds.Tables(0) Is Nothing Then
      	Throw New DatabaseException("Failed to retrieve data table.",
"1x007")
      Else
      	Return ds.Tables(0)
	End If

The query that I'm running is "SELECT UserName,
AES_DECRYPT(Password,'test') FROM sec_users WHERE UserName='" & User &
"'"

All of the tables in the database use the Latin1 character set so I'm
not sure where the UTF8 is coming from or if there is a connection
string option that I can use to ignore the colation settings.  Any help
is much appreciated.

Thanks
Scott
Thread
New error with Beta 2Scott Underwood29 Oct
  • RE: New error with Beta 2Reggie Burnett14 Nov
    • Re: New error with Beta 2Jorge Bastos14 Nov
      • RE: New error with Beta 2Jordan Sparks14 Nov