6

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,

Mark Baker
213k34 gold badges354 silver badges390 bronze badges
asked Feb 4, 2011 at 19:02
2

2 Answers 2

7

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.

answered Feb 4, 2011 at 19:16
2
  • 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 ? Commented Feb 4, 2011 at 19:33
  • You'll need to add reference to the library that you will download. Commented Feb 4, 2011 at 19:39
0

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/

answered Feb 4, 2011 at 19:08

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.