Hello I am a newbie using F# and MySQL. I have a project that needs to retrive data from mySQL database.So far, i installed wamp, mySQL, mySQL connector, php. I don't know how to contribute F# and mySQL. Can you please give me a piece of information about the steps .
Thanks,
-
3the same way you would connect my sql to c#.AK_– AK_02/04/2011 19:05:32Commented Feb 4, 2011 at 19:05
-
stackoverflow.com/questions/4624607/…jlezard– jlezard02/08/2011 13:53:21Commented Feb 8, 2011 at 13:53
2 Answers 2
You need a MySQL connector for .NET, this one, for example.
let connectionStr = "Data Source=localhost; Port=3306; User ID=root; Password=q1w2e3;"
let connection : IDbConnection = upcast new MySql.Data.MySqlClient.MySqlConnection(connectionStr)
See System.Data documentation for detailed information.
Hope this is helpful.
-
Thank you very much. But is it just enough to open a project and start to write these lines you mentioned before .Or should i add some references from the Solution Explorer,too ?opeliaa– opeliaa02/04/2011 19:33:22Commented Feb 4, 2011 at 19:33
-
You'll need to add reference to the library that you will download.Dan Abramov– Dan Abramov02/04/2011 19:39:26Commented Feb 4, 2011 at 19:39
F# works with the normal .NET class libraries. So any .NET MySQL connector will work.
For example, this on here: http://dev.mysql.com/downloads/connector/net/