ODBC 2.0.0 Comments

Rudolph van Graan rvg@REDACTED
Mon Jul 26 09:07:03 CEST 2004


> I've just been busy testing some of the new functions in ODBC 2.0.0. 
> The first thing I noticed is that the multiple result set queries 
> don't quite work:
>
> If I do a select *  I get three rows back: (This is correct)
>
> 9> odbc:sql_query(R,"select * from subscriberstat").
> {selected,["MSISDN","lastinvoke","invokecount","firstinvoke"],
>           [{"27833907767","2004-07-24 22:56:26",0,"2004-07-24 
> 22:56:26"},
>            {"27829057494","2004-07-24 22:56:53",0,"2004-07-24 
> 22:56:53"},
>            {"27829057496","2004-07-24 22:56:57",0,"2004-07-24 
> 22:56:57"}]}
>
> if I now run the same query twice, this happens:
>
> 10> odbc:sql_query(R,"select * from subscriberstat ; select * from 
> subscriberstat").
> [{selected,["MSISDN","lastinvoke","invokecount","firstinvoke"],
>            [{"27833907767","2004-07-24 22:56:26",0,"2004-07-24 
> 22:56:26"},
>             {"27829057494","2004-07-24 22:56:53",0,"2004-07-24 
> 22:56:53"},
>             {"27829057496","2004-07-24 22:56:57",0,"2004-07-24 
> 22:56:57"}]},
>  {selected,["MSISDN","lastinvoke","invokecount","firstinvoke"],[]}]
>
> In this case, the second result set is empty, where it should have 
> been the same as the first.

I have just tested this outside erlang as well:

SQL>select * from subscriberstat; select * from subscriberstat

MSISDN              |invokecount|
--------------------++-----------+
27833907767         ||0          |
27829057494         ||0          |
27829057496         ||0          |

  result set 1 returned 3 rows.


MSISDN              |invokecount|
--------------------++-----------+

  result set 2 returned 0 rows.

It seems that it is a bug elsewhere, not with ODBC 2.0.0. I have been 
testing with iodbc and postgres.

Regards,

R




More information about the erlang-questions mailing list