Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Server name not found in configuration files Severity: 2 Code: 20012
- Unknown host machine name Severity: 2 Code: 20013
- func grabVisitorsFromSQL(){
- let client = SQLClient.sharedInstance() as! SQLClient
- client.delegate = self
- client.connect("XXXXX", username: "XXX", password: "XXXXXXXXXX", database: "XXXXXX", completion: {(success) in
- if(success){
- client.execute(("SELECT TOP 1000 *" +
- "FROM Calculation"),
- completion: {(results) -> Void in
- for table in results!{
- for row in table as! [Any]{
- for column in row as! [String:String]{
- print("(column.key) = (column.value)")
- }
- }
- }
- client.disconnect()
- })
- }
- })
- }
- override func viewDidLoad() {
- super.viewDidLoad()
- ...
- grabVisitorsFromSQL()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement