[Haskell-cafe] can someone point me to more help about Database.HDBC.ODBC?

Евгений Тарасов _Genia at post.ustu.ru
Sat May 30 01:12:55 EDT 2009


Usually you should pass only DSN name in the string, if you used InnoDB 
database in MySQL.

For example, /etc/odbc.ini file:
;
;  odbc.ini configuration for MyODBC and MyODBC 3.51 Drivers
;
[.....]

[Default]
Driver       = MySQL
Description  = MySQL ODBC 3.51 Driver DSN
Server       = localhost
Port         =
User         = root
Password     =
Database     = test
Option       = 3
Socket       =

[......]

Next step, you can test a connection with command:
$ isql Default
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>

And finally, the haskell code:

conn <- connectODBC "DSN=Default;"


Michael P Mossey wrote:
> I'm trying to use Database.HDBC.ODBC to connect to a MySQL server, and 
> I cannot figure out the docs. I want to establish a connection, and I 
> know the server url, username, and password. According to these docs...
>
> http://software.complete.org/static/hdbc-odbc/doc//HDBC-odbc/Database-HDBC-ODBC.html 
>
>
> ...I am supposed to pass a string to connectODBC. These docs do not 
> explain the meaning of the passed string, but refer me to a microsoft 
> document:
>
> http://msdn2.microsoft.com/en-us/library/ms715433(VS.85).aspx
>
> I cannot make any sense of this microsoft document. I guess I don't 
> know enough about database interfaces in general. Can someone explain 
> how to make a connect to a specific URL, or point me to some clearer 
> docs?
>
> Thanks,
> Mike
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list