Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. def sqlServerConnect():
  2. jdbc_url = '127.0.0.1'
  3. username = "username"
  4. password = "password"
  5. driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
  6.  
  7. try:
  8. conn = zxJDBC.connect(jdbc_url, username, password, driver)
  9. print "Connection successful"
  10. except zxJDBC.DatabaseError, e:
  11. print "Connection failed:", e
  12.  
  13. Connection failed: driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement