Instead of 

rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
@amcid=?",placeholders=([amcid]),as_dict=True)

can you try:

rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
@amcid=?",placeholders=[amcid],as_dict=True)

I removed the parentheses around [amcid]

-Jim

On Thursday, October 15, 2020 at 5:49:38 AM UTC-5, T.R.Rajkumar wrote:


>
>
>>    - 
>>    
>>    
>>    
>>    
>>    
>>    def schII():
>>        if not URL.verify(request, hmac_key=KEY): raise HTTP(403)
>>        amcid = request.vars.amcid
>>        rowsamcdet = db(db.amc_details.amc_id == 
>>    amcid).select(db.amc_details.amcno)
>>        if not rowsamcdet:
>>            session.flash = "No jobs to make provn"
>>            redirect(URL('new_contract'))
>>        amcnod = db(db.amc_master.id == 
>>    amcid).select(db.amc_master.amcno).first()
>>        x = db(db.cont_overheads.amc_id == amcid).select(
>>    db.cont_overheads.id)
>>        for i in x:
>>            record = i['id']
>>        #rows = db(db.cont_overheads.id == record).select()
>>        fields = ['phhskn','phhskd','phhsk',
>>                  'phskn','phskd','phsk',
>>                  'phsskn','phsskd','phssk',
>>                  'phuskn','phuskd','phusk',
>>                  'alwhskn','alwhskd','alwhsk',
>>                  'alwskn','alwskd','alwsk',
>>                  'alwsskn','alwsskd','alwssk',
>>                  'alwuskn','alwuskd','alwusk',
>>                  'tax','insurance','sac','bonus',
>>                  'supchr','fringes']
>>        form = 
>>    SQLFORM(db.cont_overheads,record,keepvalues=True,fields=fields)
>>        if form.process(session=None, 
>>    formname='frmschII',dbio=False,onvalidation=schII_validation).accepted:
>>            form.vars.amc_id = amcid
>>            form.vars.update_uid = session.uname
>>            form.vars.amcno = amcnod['amcno']
>>            form.record.update_record(**dict(form.vars))
>>            db.executesql("exec update_load_schII_amt_awg @amcid = 
>>    ?",placeholders=([form.vars.amc_id]))
>>            session.flash = 'Overheads updated.'
>>            redirect(URL('new_contract'))
>>        elif form.errors:
>>            print form.errors
>>            response.flash = 'form has errors'
>>        else:
>>            response.flash = 'please fill the form'
>>        # Note: no form instance is passed to the view
>>        ## record passed to set the id value in view.
>>        rows = db(db.cont_overheads.id == record).select()    
>>        rowsconlab = db.executesql("exec usr_getconlabqty_amc_new 
>>    @amcid=?",placeholders=([amcid]),as_dict=True)
>>        rowsrate = get_amc_rate(amcid)
>>        return 
>>    dict(record=record,rowsconlab=rowsconlab,rows=rows,rowsrate=rowsrate)
>>    
>>
> the error occurs in the  line marked red.
>

-- 
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 you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f4ae9bfc-3657-4751-ad74-473542f339a0o%40googlegroups.com.

Reply via email to