[dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-04-30 Thread Max Voß
Hello, I am trying to update dabo from version 0.9.3 to a newer one, currently 0.9.9 but 0.9.5 doesn't work neither. The code that worked fine in version 0.9.3 and now creates the error is the following: tmpCursor = self.Form.PrimaryBizobj.getTempCursor() tmpCursor.execute("SELECT

[dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-03 Thread Max Voß
Hello, I am trying to update dabo from version 0.9.3 to a newer one, currently 0.9.9 but 0.9.5 doesn't work neither. The code that worked fine in version 0.9.3 and now creates the error is the following: tmpCursor = self.Form.PrimaryBizobj.getTempCursor() tmpCursor.execute("SELECT

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-04-30 Thread Ed Leafe
On Apr 30, 2013, at 10:05 AM, Max Voß wrote: > tmpCursor.execute("SELECT rechnung_position.name, preis, anzahl FROM > rechnung INNER JOIN rechnung_position ON rechnung.id=rechnung_id WHERE > re chnung.id=%i ORDER BY position" % > (self.Form.getBizobj("rechnung").getPK())) Generally,

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-04-30 Thread Max Voß
> > pk = self.Form.getBizobj("rechnung").getPK() > sql = """SELECT rechnung_position.name, preis, anzahl > FROM rechnung > INNER JOIN rechnung_position ON rechnung.id=rechnung_id > WHERE rechnung.id=%s > ORDER BY position""" > tmpCur

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-04-30 Thread Max Voß
Am Dienstag, den 30.04.2013, 17:51 +0200 schrieb Max Voß: > Could there be a problem with my table-layout or its interpretation of dabo? > > Here the SQL-Snippet of the table: > > > CREATE TABLE IF NOT EXISTS `rechnung_position` ( > `id` int(11) NOT NULL AUTO_INCREMENT, > `rechnung_id` int(1

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-04-30 Thread Ed Leafe
On Apr 30, 2013, at 1:50 PM, Max Voß wrote: > That is strange, it is in fact a problem with the conversion of my > float-fields when I change the db-fields from float to decimal-type, > what is the better choice anyway, everything works like a charm. But I > probably should open a ticket for that

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-04-30 Thread Paul McNett
On 4/30/13 12:22 PM, Ed Leafe wrote: > On Apr 30, 2013, at 1:50 PM, Max Voß wrote: > >> That is strange, it is in fact a problem with the conversion of my >> float-fields when I change the db-fields from float to decimal-type, >> what is the better choice anyway, everything works like a charm. Bu

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-01 Thread Paul McNett
On 4/30/13 12:22 PM, Ed Leafe wrote: > On Apr 30, 2013, at 1:50 PM, Max Voß wrote: > >> That is strange, it is in fact a problem with the conversion of my >> float-fields when I change the db-fields from float to decimal-type, >> what is the better choice anyway, everything works like a charm. Bu

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-01 Thread Ed Leafe
On May 1, 2013, at 6:39 PM, Paul McNett wrote: > I just wrote some test cases to show that indeed, Dabo does convert float to > decimal. Of course; that's not the question. The question is why it throws an exception in Max's situation: [snip] File "/home/max/projekte/kolibrill/dabo/d

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-01 Thread Paul McNett
On 5/1/13 5:32 PM, Ed Leafe wrote: > On May 1, 2013, at 6:39 PM, Paul McNett wrote: > >> > I just wrote some test cases to show that indeed, Dabo does convert float >> > to decimal. > Of course; that's not the question. The question is why it throws an > exception in Max's situation: > >

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-03 Thread Max Voß
Am Dienstag, den 30.04.2013, 21:10 -0700 schrieb Paul McNett: > On 4/30/13 12:22 PM, Ed Leafe wrote: > > On Apr 30, 2013, at 1:50 PM, Max Voß wrote: > > > >> That is strange, it is in fact a problem with the conversion of my > >> float-fields when I change the db-fields from float to decimal-type

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-03 Thread Paul McNett
On 5/3/13 2:02 AM, Max Voß wrote: > I think I can provide you some additional information for this problem: > > The float to decimal conversion is not a problem per se, but seems to > become one in the newer dabo-versions in combination with mysql. Since > mysql stores float-values following the s

Re: [dabo-users] Problem with custom sql-statement and getDataSet() with version>0.9.3

2013-05-03 Thread Max Voß
Am Freitag, den 03.05.2013, 06:19 -0700 schrieb Paul McNett: > This is indeed baffling. Either Please put in some sanity checks: > > 272print 1, self, field_val, "field_val: %s" %(_field_val) > 273print 2, self, self._field_val.split("."), > len(_field_val.split(".")[1]) > 274if scale