[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
Please let me know what I have to do to get the id of inserted record. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because y

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
Yes I have auto increment field and I have done manual insertions and deletions in it. But insert should return latest id irrespective of what I do to the table. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
I have a simple controller method where I insert a record in mes table and return the id of inserted record as given below: return db.mes.insert(me=metext,locale=localeid) However it return incorrect id. When I check the id of the record through MySQL workbench it shows some number greater t

[web2py] Re: Delete a row at a given index from a Rows object

2014-09-13 Thread Gliese 581 g
r].id) > > Keep in mind that will not delete the record from the database -- only > from the Rows object itself. > > Anthony > > On Saturday, September 13, 2014 12:12:39 PM UTC-4, Gliese 581 g wrote: >> >> I have fetched large number of rows from a database. I am fe

[web2py] Delete a row at a given index from a Rows object

2014-09-13 Thread Gliese 581 g
I have fetched large number of rows from a database. I am fetching the rows from database and storing it in a session. Now when I delete a record for some reasons I do not want to get the entire data back but just delete the corresponding row from the Rows object. I have the index of deleted rec

[web2py] DAL query error TypeError: unsupported operand type(s) for &: 'str' and 'Query'"

2014-09-08 Thread Gliese 581 g
I have two tables - element and example. I want to find element like items in example table but their status should either be 0 or 2. I have written a query to fetch records from two tables as given below: rows=db(('instr(microelementexamplestest.example,microelementstest.element)') &

[web2py] Re: Call web2py jsonrpc service using jquery

2014-09-03 Thread Gliese 581 g
espondingexample(nextprevindicator) return exampleid,exampletext On Thursday, 4 September 2014 10:49:27 UTC+5:30, Anthony wrote: > > Have you confirmed that the function is actually getting called? Anything > in request.body? > > Anthony > > On Thursday, September 4,

[web2py] Call web2py jsonrpc service using jquery

2014-09-03 Thread Gliese 581 g
I am trying to make ajax jsonrpc call to my web service using jQuery as given below: $(document).ready(function() { $("#btnNext,#btnPrevious").click(function() { var req = { jsonrpc: "2.0", method: "nextprevexample", id: (new Date).getTime()

[web2py] Where does Apache HTTP server stores incoming request's data

2014-02-28 Thread Gliese 581 g
I have Apache HTTP server configured on Linux machine. I am sending requests to it from my Windows machine. I want to check the contents of incoming request. Where does it stores the data of incoming request? I have checked it on my Windows machine where it uses *C:\Users\username\AppData\Local

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-10 Thread Gliese 581 g
e is re-filling the > temp db with the same data on every request, which is inefficient. > > Anthony > > On Tuesday, September 10, 2013 12:28:47 AM UTC-4, Gliese 581 g wrote: >> >> Hi Massimo, >> Thanks for suggesting this solution. I am now able to display a gird on

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-09 Thread Gliese 581 g
x) When postback happens due to any sorting or paging action, *searchform.accepts(request.vars,keepvalues=True) *fails and no grid gets displayed. Please help me to fix this. Thank you On Sunday, 8 September 2013 19:17:03 UTC+5:30, Massimo Di Pierro wrote: > You cannot unless you first l

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-08 Thread Gliese 581 g
hieve this? Please suggest me any solution. Thank you. On Friday, 6 September 2013 20:26:54 UTC+5:30, Gliese 581 g wrote: > > ** > > I am working on a project where we have a different subsystem whose API > returns a list of certain type of objects. > > I want it to be displ

[web2py] SQLFORM.grid - Create from list of objects

2013-09-06 Thread Gliese 581 g
** I am working on a project where we have a different subsystem whose API returns a list of certain type of objects. I want it to be displayed on my form. Can I use SQLForm.grid for this? Please suggest. -- --- You received this message because you are subscribed to the Google Groups

[web2py] SQLFORM.factory field's type and default properties are not working as expected

2013-09-05 Thread Gliese 581 g
Hi, I have a cutom form which I am displaying using SQLFORM.factory as given below: searchform=SQLFORM.factory( Field('uid', 'integer', requires=[IS_LENGTH(15,15)]), Field('uaccount','unicode',default=None)) if searchform.accepts(request.vars): result=__get_payments()