2008/1/15 Immanuel Normann &lt;<a href="mailto:immanuel.normann@googlemail.com">immanuel.normann@googlemail.com</a>&gt;:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I don&#39;t know what pairs of strings this function needs. The API description is to unspecific:
<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">The <tt><a>
connect</a></tt> function takes some driver specific name, value pairs
   use to setup the database connection, and a database action to run.</blockquote><div><br>What are the specific name value pairs needed (for a connection to a mysql db )?<br></div><font color="#888888">Immanuel</font></blockquote>
<div>&nbsp;</div><div>Your best bet is to download the appropriate drivers - either haskelld-hdbc-mysql or haskelldb-hsql-mysql. If you get the haskelldb sources via darcs, you can also look in the test directory to see how the connections are established.
<br><br>In my specific case, I am using PostgreSQL and by login&nbsp; function looks like this:<br><br>-- ^ Returns a function which can log into the database and perform operations.<br>login :: MonadIO m =&gt; String -&gt; Int -&gt; String -&gt; String -&gt; String -&gt; (Database -&gt; m a) -&gt; m a
<br>login server port user password dbname = postgresqlConnect [(&quot;host&quot;, server),<br>&nbsp; (&quot;port&quot;, show port),<br>&nbsp; (&quot;user&quot;, user),<br>&nbsp; (&quot;password&quot;, password),<br>&nbsp; (&quot;dbname&quot;, dbname)]
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>_______________________________________________<br>Haskell-Cafe mailing list
<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br><br>
</blockquote></div><br>