Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: MySql Teething Problems!
09-29-2005, 12:47 PM #1
- Join Date
- Nov 2002
- Loughborough (UK)
- Thanked 0 Times in 0 Posts
MySql Teething Problems!
I'm really struggling to connect to a MySql database hosted on Brinkster. Do I need to install a new DLL to be able to connect to MySQL? If I do, where can I get this from and does it just need dropping in the bin directory?
The picture; Basically I have an application all set-up against a MS Access DB and now I just want to point it elsewhere. Can I do this by changing the connection string or do all the Command objects need changing?
I should probably point out that I'm using notepad so don't have Visual Studio's intellisense thing. If it helps you understand my problem, I have put my code below. Any help you can give would be REALLY appreciated.
string strSql = "SELECT TOP 1 ### FROM ###";
string strConn = @"Provider:MySQLProv; SERVER=###; DATABASE=###; USER=###; PASSWORD=###;";
OleDbConnection objConn = new OleDbConnection(strConn);
OleDbCommand objCommand = new OleDbCommand(strSql, objConn);
string ReturnValue = (string)objCommand.ExecuteScalar().ToString();