<div class="gmail_quote">On Thu, Sep 2, 2010 at 3:02 PM, Ian <span dir="ltr"><<a href="mailto:hobson42@gmaiil.com">hobson42@gmaiil.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"> On 02/09/2010 19:34, Victor Subervi wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
for some reason running the command through python *omits* this one data!! The only difference is that a flag in spreadsheets (Temp) is set to 1. Why on earth doesn't it work in python??<br>
</blockquote></div>
Some ideas to follow up. (These are only guesses).<br>
<br>
1) One of the enum type fields contains an invalid value (perhaps a value removed from the column definition).<br></blockquote><div><br>There are no enum type fields. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
2) The second id field (<a href="http://products.id" target="_blank">products.id</a>?) appears to be very large. I wonder what would happen if it was larger than the auto-increment value?<br></blockquote><div><br>It's not an ID field. It doesn't auto_increment. <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
3) A field in the one of the rows in the missing data contains bytes that are invalid in the character encoding you are using in python.<br></blockquote><div><br>I changed the only bytes I thought might affect it. Furthermore, I successfully added the blasted data to that field so it would show up in the spreadsheet through another form. More on that later. <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
4) The python field type used for some column in the missing row, contains a value that cannot be held in the python variable assigned.<br></blockquote><div><br>If that were so, none of the data would show up.<br><br>Please look at this comparison:<br>
<br>FIELD BAD DATA GOOD DATA<br>ID 609 161<br>Client Lincoln_Properties Lincoln_Properties<br>Multi 0 0<br>Item 2030572 40x48Green<br>Markup 0.00 99.32<br>
Temp 1 Null<br>ID 343 37<br>Item 2030572 40x48Green<br>Description Americo 20" Beige Floor Pad Green Can Liners<br>UOM 5/cs 1000/cs<br>
Cost 15.88 17.56<br>ID 335 37<br>ProductsID 343 37<br>CategoryID 49 23<br>ID 49 23<br>Category Mats Can Liners<br>
Parent Restaurant Paper/Pla Bags<br><br>I have changed the value of Temp to Null and Markup to 11.11 to see if that would somehow make a difference. It didn't. Then I used my TTW form for adding data "regularly" to spreadsheets and it worked. The form I'm testing enables the client to add data himself. The code is the same in both cases:<br>
<br>"regular"<br>cursor.execute('insert into spreadsheets values (Null, %s, 0, %s, 0, Null)', (client, prod))<br><br>"special"<br>cursor.execute('insert into spreadsheets values (Null, %s, 0, %s, 0, Null)', (client, product[1]))<br>
<br>I checked permissions and changed ownership to make the two scripts identical. Again, the data gets entered into MySQL correctly...it just doesn't show up with the rest of the data in the TTW form!! Why??<br>TIA,<br>
beno <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Regards<br>
<br>
Ian<br><font color="#888888">
<br>
<br>
<br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>