Click to See Complete Forum and Search --> : [RESOLVED] Microsoft Enterprise Library + MySQL Question


Grofit
February 28th, 2009, 07:42 AM
Hey there,

Ive got a small app im working on that im using the enterprise library for, however ive just realised that it doesnt support MySQL nativley.

Now i found that there was a MySQL extension for 3.1 in the contrib area, so i downloaded it, but without sounding like too much of a dunce, i dont know how im supposed to use it. There are no example files for it and i cant find anything online about it.

Basically what i need to know:

- What do i need to put in my app/web config to get it to allow MySQL databases
- What references will need to be included
- Do i need to make any code changes? i presume it will all be abstracted so the code shouldnt change, just the config and references.

Any help would be great, as i said ive scoured the net for any info but its all for either VERY old versions that want you to build a custom dll, or the pages dont load, so im running out of options :(

JonnyPoet
February 28th, 2009, 01:47 PM
There is no big problem existing connecting to a mySql database

Here is a zipfile from another one, who got help here in the forum.
He worked on a game ( oldstyle using icons ).
Look into the zipfile there you will find how he connects to his MySQL database.

http://www.codeguru.com/forum/showthread.php?t=426371&highlight=Game (http://www.codeguru.com/forum/showthread.php?t=426371&highlight=Game)
The post is #7
The file is named explore.zip

Maybe that helps a bit.:wave:

Grofit
February 28th, 2009, 04:03 PM
Hey,

I know how to connect to a MySQL database and most other datasets, although in this application im using the Microsoft Enterprise libraries which abstract out alot of the common ADO things...

I know how to use the Enterprise libraries to retrieve data etc, its just i dont know how to set up the configuration files and the contrib extensions to let it use the MySQL data provider...

Thanks for responding though...

Grofit
February 28th, 2009, 06:17 PM
Incase anyone else gets same problems as me, if you go to where you installed the enterprise libs you should have an enterprise lib configurator executable in the BIN dir.

If you make a new dummy config file and add a new connection string and provider, then within the provider screen add the contribs mysql lib then save the config file, you can copy and paste out the provider and config elements it needs.

Im now having problems getting data back with the ExecuteReader() but thats another story!