Dear Mr.Massimo, Sorry to mail u again, but the problem was different one. This time again I deleted the files in the databases forlder of the application(to clear all the data in the database). But i did not delete the code in the model and the tables froze again! So it seems that if we delete the files in the database folder without clearing the model, the database freezes.
Thanking you once more! With Regards. rahulserver On 10 June 2012 12:46, RAHUL PRIYADARSI <[email protected]> wrote: > Dear Mr.Massimo, > I have now resolved the issue. The problem was that the line 'db = > DAL('sqlite://storage.sqlite')' was missing from my model. I had initially > appended my model code to the default code that comes in db.py. Later on I > removed it and placed in a separate db.dpp.py. After this only problems > started appearing! > > Thanks Again, > > Yours Sincerely > rahulserver. > > On 10 June 2012 11:58, RAHUL PRIYADARSI <[email protected]> wrote: > >> Dear Mr.Massimo!, >> Thank you very much for your quick response. >> I am presently using web2py version 1.99.7(download url: >> http://www.web2py.com/examples/static/web2py_win.zip). >> You are right that something else is causing the problem. Now i can not >> perform any operations(insert,edit,delete or update) on any of the tables. >> Something mysteriously has frozen the whole model. I tried dropping a few >> fields from the table, they do get dropped.But no crud takes place on the >> database. I suspect that i had deleted the files in the databases folder of >> my application since sqllite does not issue alter command if i change a few >> field definitions(like adding unique constraint). But they did get created >> again when i changed the model. >> >> I hope you can help me find a way out of this! >> >> Yours Sincerely, >> Rahul Priyadarsi. >> >> >> On 9 June 2012 20:08, Massimo Di Pierro <[email protected]>wrote: >> >>> I just tried this and it works fine with me. I only had to change the >>> compute field: >>> >>> Field('Amt_Outstanding',compute=lambda r: (r.Net_Due or >>> 0)-(r.Amt_Paid or 0)) >>> >>> to avoid errors when Net_Due or Amt_Paid are blank. >>> >>> What web2py or python version do you use? I suspect something else is >>> causing the problem. >>> >>> On Saturday, 9 June 2012 01:01:25 UTC-5, rahulserver wrote: >>>> >>>> Hi! >>>> I have the following table in my model: >>>> db.define_table('Transaction_**Master',Field('Account',db.** >>>> Account_Master,requires=IS_IN_**DB(db,'Account_Master.id', >>>> '%(Account)s %(State)s',zero=T('choose one'))),Field('Exam_Date','** >>>> date'),Field('Entry_Date','**date',default=request.now),** >>>> Field('C35Hindi','integer',**default=0),Field('C35Marathi',** >>>> 'integer',default=0),Field('**C35Gujarati','integer',** >>>> default=0),Field('C35English',**'integer',default=0),Field('** >>>> C35Oriya','integer',default=0)**,Field('C35Telegu','integer',** >>>> default=0),Field('C35Kannada',**'integer',default=0),Field('** >>>> C35Punjabi','integer',default=**0),Field('C35Bengali','** >>>> integer',default=0),Field('**C68Hindi','integer',default=0)** >>>> ,Field('C68Marathi','integer',**default=0),Field('C68Gujarati'** >>>> ,'integer',default=0),Field('**C68English','integer',default=** >>>> 0),Field('C68Oriya','integer',**default=0),Field('C68Telegu','** >>>> integer',default=0),Field('**C68Kannada','integer',default=** >>>> 0),Field('C68Punjabi','**integer',default=0),Field('** >>>> C68Bengali','integer',default=**0),Field('C912Hindi','integer'** >>>> ,default=0),Field('**C912Marathi','integer',**default=0),Field('** >>>> C912Gujarati','integer',**default=0),Field('C912English'** >>>> ,'integer',default=0),Field('**C912Oriya','integer',default=** >>>> 0),Field('C912Telegu','**integer',default=0),Field('** >>>> C912Kannada','integer',**default=0),Field('C912Punjabi'** >>>> ,'integer',default=0),Field('**C912Bengali','integer',** >>>> default=0),Field('CSHindi','**integer',default=0),Field('** >>>> CSMarathi','integer',default=**0),Field('CSGujarati','** >>>> integer',default=0),Field('**CSEnglish','integer',default=** >>>> 0),Field('CSOriya','integer',**default=0),Field('CSTelegu','** >>>> integer',default=0),Field('**CSKannada','integer',default=** >>>> 0),Field('CSPunjabi','integer'**,default=0),Field('CSBengali',** >>>> 'integer',default=0),Field('**C35','integer',default=0),** >>>> Field('C68','integer',default=**0),Field('C912','integer',** >>>> default=0),Field('grad','**integer'),Field('Schoolwise_** >>>> Form','upload'),Field('**Schoolwise_Form_Name'),Field('** >>>> Hath_Ghari','integer'),Field('**Lekhan_Pad','integer'),Field('** >>>> Geometry_Box','integer'),**Field('College_Bag','integer')** >>>> ,Field('class3_5T','integer',**default=0),Field('class6_8T','** >>>> integer',default=0),Field('**class9_12T','integer',default=** >>>> 0),Field('gradT','integer',**default=0),Field('Amt_3_12','** >>>> integer'),Field('Amt_grad','**integer'),Field('Pr1','** >>>> integer'),Field('Pr2','**integer'),Field('Gross_Due','** >>>> integer'),Field('Net_Due','**integer'),Field('Amt_Paid','** >>>> integer',default=0),Field('**Amt_Outstanding',compute=**lambda r: >>>> r['Net_Due']-r['Amt_Paid']),**format='%(Account)s %(Exam_Date)s') >>>> >>>> When i try to insert a value into it using either database >>>> administration(admin interface) or thru sqlform, i am not able to insert >>>> the data. When i flash the form.errors in sqlform, i get the following >>>> :<Storage{}> >>>> What could be the reason? >>>> Is there a limit to the maximum number of fields in a table in sqllite? >>>> If so then what could be done apart from splitting the table? >>>> >>> >> >

