[Closed] Connecting to a MySQL database, why doesn't it work?
Hi loocas,
If this works for you, great!
When I tried it, I had no problem connection to MySQL through the ODBC connector. The issue was that some data type didn’t convert to mxs values, and crashed the script. That’s why I went with myX solution.
I don’t remember all the types that worked and the ones that didn’t work, but time-date types and blobs gave me hell
Cheers,
o
The downside being that the .NET translation is about 10 times slower than the ODBC connection.
The ODBC connection can get 2,000 records in a fraction of a second.
Converting a .NET dataarray to a maxarray takes about 1-1.5 seconds.
If you convert it to a struct then it takes even longer ~1.25.175 seconds.
I have gotten to writing all of my SQL requests by hand for .net to be as lean as possible while with ODBC I would just grab all of the data and let max deal with it later.
Some things are faster with .Net for instance if you use a ExecuteScalar instead of ExecuteReader on the command object it returns a single value which is lightning fast.