Advertisement
Guest User

Untitled

a guest
Apr 21st, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. try:
  2. conn = pyodbc.connect("DRIVER={/usr/local/lib/libmyodbc3.so};SERVER=localhost;DATABASE=user_data;USER=user;PASSWORD=user_pass;OPTION=3;autoCommit = True")
  3. cur = conn.cursor()
  4. cur.execute("{call insert_user_sp(0,'aby@gmail.com','345','male','1992-01-12','www.facebook.com','abc','xyz','p','jr','english','i am student')}")
  5. conn.commit()
  6.  
  7. except Error as e:
  8. print e
  9.  
  10. finally:
  11. cur.close()
  12. conn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement