Advertisement
Guest User

Untitled

a guest
Apr 19th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. Server name not found in configuration files Severity: 2 Code: 20012
  2. Unknown host machine name Severity: 2 Code: 20013
  3.  
  4. func grabVisitorsFromSQL(){
  5.  
  6. let client = SQLClient.sharedInstance() as! SQLClient
  7.  
  8. client.delegate = self
  9. client.connect("XXXXX", username: "XXX", password: "XXXXXXXXXX", database: "XXXXXX", completion: {(success) in
  10. if(success){
  11. client.execute(("SELECT TOP 1000 *" +
  12. "FROM Calculation"),
  13.  
  14. completion: {(results) -> Void in
  15.  
  16. for table in results!{
  17. for row in table as! [Any]{
  18. for column in row as! [String:String]{
  19.  
  20. print("(column.key) = (column.value)")
  21. }
  22. }
  23. }
  24. client.disconnect()
  25. })
  26. }
  27. })
  28. }
  29.  
  30. override func viewDidLoad() {
  31.  
  32. super.viewDidLoad()
  33. ...
  34.  
  35. grabVisitorsFromSQL()
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement