Well, didn't I jump the gun.

[EMAIL PROTECTED] wrote:
> Massimo,
>
> Oh, damn, nevermind, I screwed that all up.  The error was actually in
> my preceding delete call not the update_record and it was my screw
> up.
>
> Sorry.
>
> New question though: is there anyway to delete directly (or more
> directoy) on a a SQLStorage object instead of using the db().delete()
> call?
>
> Thanks.
>
>
>
>
> On Oct 30, 11:59 am, mdipierro <[EMAIL PROTECTED]> wrote:
>   
>> Did you modify the sql.py file? If so could you show us how to?
>> That is not a web2py error but a driver error.
>>
>> Massimo
>>
>> On Oct 30, 10:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> wrote:
>>
>>     
>>> web2py users,
>>>       
>>> I'm using pyodbc, unixodbc and freetds to hit an MSSQL database.
>>>       
>>> When I attempt to do a:
>>>       
>>> a_sample_inventory = db(db.smp_inventory.smp_id ==
>>> request.vars.smp_id).select()
>>> a_sample_inventory[0].update_record(status="present")
>>>       
>>> I get:
>>>       
>>> Traceback (most recent call last):
>>>   File "/home/larsenma/web2py/gluon/restricted.py", line 62, in
>>> restricted
>>>   File "/usr/share/web2py/applications/hpv/controllers/home.py", line
>>> 45, in <module>
>>>   File "/home/larsenma/web2py/gluon/globals.py", line 55, in <lambda>
>>>   File "/usr/share/web2py/applications/hpv/controllers/home.py", line
>>> 40, in unreserve
>>>     db(a_sample_history[0]).delete()
>>>   File "/usr/share/web2py/gluon/sql.py", line 1110, in delete
>>>     self._db._execute(query)
>>>   File "/usr/share/web2py/gluon/sql.py", line 448, in <lambda>
>>>     self._execute=lambda *a,**b: self._cursor.execute(*a,**b)
>>> ProgrammingError: ('42000', "[42000] [FreeTDS][SQL Server]Incorrect
>>> syntax near '<'. (102) (SQLExecDirectW)")
>>>       
>>> I looked at the generated sql statement and it looks fine.
>>> And ideas what's going on?
>>>       
>>> Thanks.
>>>       
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn:Timothy Farrell
n:Farrell;Timothy
org:Statewide General Insurance Agency;IT
adr:;;4501 East 31st Street;Tulsa;OK;74135;US
email;internet:[EMAIL PROTECTED]
title:Computer Guy
tel;work:(918)492-1446
url:www.swgen.com
version:2.1
end:vcard

Reply via email to