Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Bug report: Stata crashes when inserting dataset with missing data via ODBC.


From   [email protected] (Kevin Turner)
To   [email protected]
Subject   st: Re: Bug report: Stata crashes when inserting dataset with missing data via ODBC.
Date   Fri, 05 Dec 2003 09:40:14 -0600

This reply email was sent to statalist yesterday but never appeared on the 
list. This is just a re-send of that email. 


---- Original Reply ----

Michael Ingre ([email protected]) writes:

> I have a problem when trying to insert data via an ODBC connection.
> 
>. odbc insert _all, t(table) dsn(myodbcconnection) create
>
>When the above command is executed the first 4 rows of data is inserted into
>the table. Then Stata crashes (exits to the OS) and has to be restarted.
>
>The first 4 rows contains complete data and the fifth row has one cell with
>missing data.  If I enter a value in the cell with missing data and try
>again, 10 more rows will be inserted into the database, again crashing on
>the first row with missing data.
>
>The problem seems to be related to missing data. Other ODBC functions seems
>to be working fine (as far as I know): list, query, load
>
>My system config is:
>
>Stata       ver 8.2 31 Oct 2003
>Mac OS X    ver 10.2.8 (6R73)
>MySQL       ver 4.15
>MyODBC      ver 3.51.06


This problem was fixed and will be in the next update. 

The issue is only present with -insert- and has to do with the fact that 
missing values were were being inserted as large numerical numbers instead of 
just NULL. The initial reason for leaving the large numerical values was to
preserve the multiple missing values that Stata supports (.a - .z). However,
as time went by, it became apparent that many ODBC drivers simply could not 
handle the larger values in the context that they were being inserted. Many
times the result was a crash. So the fix was made to convert all Stata missing
values to NULL.

--Kevin
[email protected]


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index