import pyodbc
import datetime

cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 
10.0};SERVER=barney;DATABASE=imagecontest_dev;UID=imagecontest2013;PWD=imagecontest2013'
)
cursor = cnxn.cursor()



now = datetime.datetime(2013, 3, 13, 16, 46, 4, 117000).isoformat()[:19].
replace('T',' ')

cursor.execute("insert into auth_event(time_stamp, client_ip, origin, 
description) values (?, ?, ?, ?)", now, '192.0.0.1', 'origin', 'description'
)
cnxn.commit()


-- 

--- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to