Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I get this error while I’m using “MySQL ODBC 5.1 Driver” to connect asp.net with MySQL instead of “MySQL ODBC 3.51 Driver”

Code below works great with “MySQL ODBC 3.51 Driver”

Dim sConString As String = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost; DATABASE=hasan;USER=root;PASSWORD=toor; OPTION=3;"
Dim oConnection As OdbcConnection = New OdbcConnection(sConString)
Dim sSQL As String = “SELECT * FROM deneme”
Dim oDataAdapter As OdbcDataAdapter = New OdbcDataAdapter(sSQL, oConnection)
Dim oDataSet As DataSet = New DataSet()
oDataAdapter.Fill(oDataSet)
GridView1.DataSource = oDataSet
GridView1.DataBind()