# Library to connect to Microsoft Sql Server?

**URL:** <https://discuss.ocaml.org/t/library-to-connect-to-microsoft-sql-server/692>\
**Category:** Learning\
**Tags:** db\
**Created:** [August 9, 2017, 6:06pm UTC](https://discuss.ocaml.org/t/library-to-connect-to-microsoft-sql-server/692 "2017-08-09T18:06:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SYStems](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/systems/32/5770_2.png) [@SYStems](https://discuss.ocaml.org/u/SYStems)\
**Post date:** [August 9, 2017, 6:06pm UTC](https://discuss.ocaml.org/t/library-to-connect-to-microsoft-sql-server/692/1 "2017-08-09T18:06:03Z")

</div>

Is there any library to connect to Microsoft sql server from ocaml?  
And is there any ocaml equivalent to JDBC or Perl’s DBI

* * *

---

<div class="post-metadata">

**Author:** ![Chris00](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/chris00/32/48_2.png) [@Chris00](https://discuss.ocaml.org/u/Chris00)\
**Post date:** [August 9, 2017, 6:52pm UTC](https://discuss.ocaml.org/t/library-to-connect-to-microsoft-sql-server/692/2 "2017-08-09T18:52:57Z")

</div>

You can use [OCaml FreeTDS](https://github.com/kennknowles/ocaml-freetds) or [OCaml ODBC](https://github.com/search?utf8=%E2%9C%93&q=ocaml+odbc&type=)with the correct driver. Lately, I’ve been using the former. There used to be an [OCaml DBI](http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=381) but it is no longer up-to-date.
