Simple tests: MyODBC and VS.NET "05
am 03.05.2006 14:59:50 von David DindorpHello.
Here is a couple of simple tests using
MyODBC v3.51.12-2 and Visual Studio .NET 2005.
I'm hoping that the MyODBC dev team can perform
these (should take about 20 minutes) before doing
the next release of MyODBC. Alternatively, the
dev team can post a prerelease on this list and
I'm sure that someone will step up to the task.
I haven't pursued any of the problems I've found further than
mentioned here, mainly because tracing and other things are
currently known to be broken in MyODBC.
1) Start by creating a new Windows Forms project
==================== =====3D=
==================== ===3D
Open these snap-ins:
Server Explorer (Menu: View --> Server Explorer)
Data Sources (Menu: Data --> Show Data Sources)
2) Create data source (Server Explorer)
==================== =====3D=
==============
Using DSN:
Driver=3D{MySQL ODBC 3.51 Driver};
Server=3D
Seems to work fine, "Test Connection" succeeds.
When examining the created object the DSN looks like this:
Driver=3D{MySQL ODBC 3.51 Driver};
option=3D0;port=3D0;server=3D
Note the bogus 'port' option.
3) Browse tables (Server Explorer)
==================== =====3D=
=========3D
To connect, right-click data source and choose 'Refresh'.
Does not work, an error dialog pops up:
---------------------------
Server Explorer Error
---------------------------
Server Explorer is unable to perform this operation.
See below for details:
=20
Failed to call the ODBC driver connection utility.
---------------------------
OK
---------------------------
4) Add data source to project (Data Sources)
==================== =====3D=
===================3D
Does not work.
An error dialog pops up:
---------------------------
Microsoft Visual Studio
---------------------------
Failed to open a connection to the database
=20
"Failed to call the ODBC driver connection utility."
=20
Check the connection and try again.
---------------------------
OK Help
---------------------------
5) Create a new data source with altered DSN (Server Explorer)
==================== =====3D=
==================== =====3D=
============
Trying to add a new DSN that includes a 'Port' setting.
Does not work, VS.NET 2005 deletes the new data source automatically
if the transport (ODBC) and user name (password?) matches an existing
data source.
6) Create new data source by replacing old (Server Explorer)
==================== =====3D=
==================== =====3D=
==========
Removed the old data source and created a new
one where the DSN contains "Port=3D3306;".
Works.
7) Repeat test 3 - Browse tables (Server Explorer)
==================== =====3D=
==================== =====3D=
To connect, right-click the data source and choose 'Refresh'.
Connection succeeds, right-click data source and choose 'Properties'
to see MySQL server version number in 'Version' property.
Browsing tables does not work, VS.NET 2005 cannot see any tables.
8) Repeat test 4 - Add data source to project (Data Sources)
==================== =====3D=
==================== =====3D=
==========
Fails. An error dialog is shown:
---------------------------
Data Source Configuration Wizard
---------------------------
Which database objects do you want in your dataset?
=20
An error occurred while retrieving the information from the database.
=20
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
=20
DataSet name:
---------------------------
< Previous Next > Finish Cancel
---------------------------
9) Query window (Server Explorer)
==================== =====3D=
========
Right-click data source, choose 'New Query'.
Works, but error dialog pops up:
---------------------------
Microsoft Visual Studio
---------------------------
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
---------------------------
OK
---------------------------
10) Perform SQL query (Query window)
==================== =====3D=
===========3D
Using this query (and Menu: Query Designer --> Execute SQL to run):
SELECT * FROM
Works.
11) Create a new ASP.NET Web Site project
==================== =====3D=
================
Open the Toolbox snap-in (Menu: View --> Toolbox) and make sure it
shows non-visible controls (Menu: View --> Non Visual Controls).
Open the default web page in design view by right-clicking
"default.aspx" and choosing 'View Designer'.
12) Add data source to a project
==================== =====3D=
=======3D
Drag an 'SqlDataSource' from the Toolbox to the Designer view.
Click the tiny 'Tasks' button on the newly created object and choose
'Configure Data Source'.
Does not work; after selecting connection, an error dialog pops up:
---------------------------
Microsoft Visual Studio
---------------------------
Database schema could not be retrieved for this connection.
=20
Please make sure the connection settings are correct and that
the database is online.
=20
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
---------------------------
OK
---------------------------
13) Other notable MyODBC <-> .NET interaction issues
==================== =====3D=
==================== =====3D=
==
Cannot use DOUBLE fields (probably other floating point fields too).
http://bugs.mysql.com/5225
Cannot use BIGINT fields.
http://bugs.mysql.com/18755
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg