REA_ANDREW
asked on
Connect to MySQL Database
I am reading up on this and cannot seem to get it right.
I am sure there is an oleDB way of connecting to a MySQL Database which is localhost.
can anyway give me any ideas of how to do this.
thanks in advance
Andy
I am sure there is an oleDB way of connecting to a MySQL Database which is localhost.
can anyway give me any ideas of how to do this.
thanks in advance
Andy
ASKER
Where in that string Can I supply the server as locahost?
Also Can you show me this integrated with the connectionStrings Tab in the config file. as i am a bit rusty of how to write them
thanks very much
Andy
Also Can you show me this integrated with the connectionStrings Tab in the config file. as i am a bit rusty of how to write them
thanks very much
Andy
Have a look at this example: http://www.csharphelp.com/archives2/archive288.html
That includes a example project on how to do it with Oledb.
That includes a example project on how to do it with Oledb.
ASKER
I now get this error
Compiler Error Message: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 15: protected void Page_Load(object sender, EventArgs e)
Line 16: {
Line 17: MySql.Data.MySqlClient.MyS qlConnecti on conn;
Line 18: string myConnectionString;
Line 19:
Compiler Error Message: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 15: protected void Page_Load(object sender, EventArgs e)
Line 16: {
Line 17: MySql.Data.MySqlClient.MyS
Line 18: string myConnectionString;
Line 19:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have done that. in visual Studio. then I ssave it close it down and copy all the files to the server. It then again gives me the error message. Why will it not find it on the server when the bin directory is write there
"Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdas
you can alose checkout out the MySQL Connection strings as
http://www.connectionstrings.com/
AW