2013-03-23 31 views

回答

3

是的,這是可能的,這裏是一些示例代碼:

<erl> 

out(A) -> 
    application:start(odbc), 
    ConnString = 
     "Driver={MySQL ODBC 5.1 Driver};" ++ 
     "Server=localhost;Database=test;" ++ 
     "User=root;Password=ace152;" ++ 
     "Option=3;", 
    {ok, Conn} = odbc:connect(ConnString, []), 
    Results = odbc:sql_query(Conn, "SELECT * FROM test_table"), 
    {html,"Something here."}. 

</erl>