cgi odbc sql delete ?

Michal Wallace (sabren) sabren at manifestation.com
Sun May 28 16:08:44 EDT 2000


On Sun, 28 May 2000, Rob Elder wrote:

> It probably is a format problem (???) but I don't know what it is. If the
> problem is not obvious, please give me some ideas on how to debug this. I
> have totally run out of ideas. TIA.

Well, I have no idea what the problem is here. It sure looks right. 
I suspect sysID is getting assigned to something unexpected. But,
if you're looking for debugging strategies:

Whenever I'm debuggint SQL, the first thing I do is use a temporary
variable so I can see exactly what query/statement I just generated:

    ...
    sql = "DELETE FROM userTable WHERE userID = %s" % sysID
    print sql
    dbcursor.execute(sql)
    ...

Or comment out the execute line, and check the data to make sure it's
there. If it STILL looks right, try pasting this into an Access query
window (the SQL view, of course) and see what happens.

The other thing is to double check that the insert is working the
way you want. Eg, is userID what you think it is? If that field is
an autonumber, it may not be.


Cheers,

- Michal
-------------------------------------------------------------------------
http://www.manifestation.com/         http://www.linkwatcher.com/metalog/
-------------------------------------------------------------------------






More information about the Python-list mailing list