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

2009-05-30 Thread Wei Hu
Try http://sites.google.com/site/haskell/notes/connecting-to-mysql-with-haskell
that I wrote up. An important thing that I don't think was documented
anywhere is that the trailing ';' is required.

On Fri, May 29, 2009 at 11:01 PM, Michael P Mossey
m...@alumni.caltech.edu 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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-05-29 Thread Michael P Mossey
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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-05-29 Thread Justin Bailey
Try this:

  http://www.connectionstrings.com/

On Fri, May 29, 2009 at 8:01 PM, Michael P Mossey
m...@alumni.caltech.edu 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@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-05-29 Thread Евгений Тарасов
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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe