Can someone provide with me some code to connect to a MySQL database and check the whole of one column to see if it is less than 2?
I've looked online and have found nothing which can help.
Thanks so much, Lawrence
Can someone provide with me some code to connect to a MySQL database and check the whole of one column to see if it is less than 2?
I've looked online and have found nothing which can help.
Thanks so much, Lawrence
A good first step is to download MySQL's Connector/Net; the current version is 6.2.2.
Unfortunately, I'm terribad at dealing with .NET's TableAdapters and Dataset Designer stuff, but those links may be useful.
You need to install these components described in this article. You can use any ADO.NET tutorial as a guide for how to query the database except you will be using MySqlConnection and other MySql* objects instead. There is example VB.NET code in the article that is very similar to the C# you would use.
http://www.15seconds.com/issue/050407.htm
Here's plenty of C# code: http://www.functionx.com/mysqlnet/csharp/Lesson02.htm