Here is the beauty of the .NET dataproviders–the code needed to access MySql will be nearly identical to the code for accessing, say, MsSql. You just need to change the types to use the right database specific providers.
Would work exactly the same if you were using MsSql, Oracle, Postgres, Access or anything else that fully implemented the ADO.NET dataprovider pattern. To make it work with MySql, you would just need to change the DbConnection conn=new SqlConnection() to DbConnection conn=new MySqlConnection() [or whatever they call the connection class].
ADO actually worked the same way, the code you posted was DB agnostic save the adoCon.Open statement.
I appreciate your effort. I don’t quite understand some parts of the code. Can you give me a more specific/complete code that I can use by copy & paste? I have tried to connect via myODBC, OleDB and I’ve used sqlcommand/oledbcommand but I am fed of trying any more.
Can you please give me the exact code? Am I missing some important things like a project file with a web.config for example? It would be better for me to understand if I have the complete source file that I can paste into my webfolder and run on my server.
"Give a man a fish, he eats for a day. Teach a man to fish, he eats for life . . . "
PS: To start fishing, what you really want is to use a SqlDataSource control combined with a gridview and possibly a details view. Look at the tutorials at the above link, they will explain it better than some copied and pasted code snippet ever will.
There is no need for that! pfft… I would suggest READING the link or other sites, and then you would be able to get the solution yourself.
If it’s a collection of data, I would recommend staying with the DataGrid (or GridView as Wyatt suggests) for displaying the data. If you want more control over the appearence, I would suggest looking at the Repeater webcontrol too
I gave you one. Several in fact. What I am not going to do is sit here and write your code for you. Well, unless you hire me to write your code.
Its pretty clear to me you have no desire to learn anything, but rather copy and paste your way out of whatever jam you got yourself into. So I shall grant your request and I will not be bothering with you again.