<br><div class="gmail_quote">On Mon, May 11, 2009 at 4:53 PM, Carl McDade <span dir="ltr"><<a href="mailto:carlmcdade@gmail.com">carlmcdade@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am beginning to think this is a bug because the underscore does not<br>
have to be in the query. Its appearance in the result causes things to<br>
crash.<br>
<div class="im"><br>
5> Results = odbc:sql_query(Conn, "SELECT * FROM employee").<br>
</div>** exception error: no match of right hand side value<br>
                    {selected,["NR","FIRSTNAME","LASTNAME","GENDER","town",<br>
                               "tel_no"],<br>
                              [{1,"carl","mcdade","m","hayward","23562366"},<br>
                               {2,"john","mason","m","san pablo","55214569"}]}<br>
<div class="im">6> Results = odbc:sql_query(Conn, "SELECT * FROM employee").<br>
</div>** exception error: no match of right hand side value {error,<br>
                                                       connection_closed}<br>
<div class="im">7> Results = odbc:sql_query(Conn, "SELECT * FROM employee").<br>
</div>** exception error: no match of right hand side value {error,<br>
                                                       connection_closed}<br>
8><br>
<br>
The above causes werl.exe to crash and have to be restarted to get any<br>
response. You can only get a query response once before the underscore<br>
kills things.<br>
<br>
After removing the underscore from the column name the query runs as<br>
it should and as many times as it is called.<br>
<div class="im"><br>
Eshell V5.7.1  (abort with ^G)<br>
1> application:start(odbc).<br>
ok<br>
2> ConnString = "Driver={MySQL ODBC 5.1<br>
</div>Driver};Server=localhost;Database=wordpress;User=root;Password=;Option=3;".<br>
<div class="im">"Driver={MySQL ODBC 5.1<br>
Driver};Server=localhost;Database=wordpress;User=root;Password=;Option=3;"<br>
3> {ok, Conn} = odbc:connect(ConnString, []).<br>
{ok,<0.40.0>}<br>
</div><div class="im">4> Results = odbc:sql_query(Conn, "SELECT * FROM employee").<br>
</div>{selected,["NR","FIRSTNAME","LASTNAME","GENDER","town",<br>
           "telno"],<br>
          [{1,"carl","mcdade","m","hayward","23562366"},<br>
           {2,"john","mason","m","san pablo","55214569"}]}<br>
<div class="im">5> Results = odbc:sql_query(Conn, "SELECT * FROM employee").<br>
</div>{selected,["NR","FIRSTNAME","LASTNAME","GENDER","town",<br>
           "telno"],<br>
          [{1,"carl","mcdade","m","hayward","23562366"},<br>
           {2,"john","mason","m","san pablo","55214569"}]}<br>
<div class="im">6> Results = odbc:sql_query(Conn, "SELECT * FROM employee").<br>
</div>{selected,["NR","FIRSTNAME","LASTNAME","GENDER","town",<br>
           "telno"],<br>
          [{1,"carl","mcdade","m","hayward","23562366"},<br>
           {2,"john","mason","m","san pablo","55214569"}]}<br>
7><br>
<div><br></div></blockquote></div><br>Umm, you are matching agains the bound name Results over and over. Remember that you need a fresh name to capture new results.<br><br>And also, the odbc process handling the connection is linked to the shell process, when you get an error, the shell is restarted and therefore the link breakage causes your connection to go away as well.<br>
<br>Robby<br><br><br><br>