Giter Club home page Giter Club logo

sqlclient's Introduction

SQLClient

Native Microsoft SQL Server client for iOS. An Objective-C wrapper around the open-source FreeTDS library.

##Sample Usage

#import "SQLClient.h"

SQLClient* client = [SQLClient sharedInstance];
client.delegate = self;
[client connect:@"server:port" username:@"user" password:@"pass" database:@"db" completion:^(BOOL success) {
    if (success)
    {
      [client execute:@"SELECT * FROM Users" completion:^(NSArray* results) {
        for (NSArray* table in results)
          for (NSDictionary* row in table)
            for (NSString* column in row)
              NSLog(@"%@=%@", column, row[column]);
        [client disconnect];
      }];
    }
}];

//Required
- (void)error:(NSString*)error code:(int)code severity:(int)severity
{
  NSLog(@"Error #%d: %@ (Severity %d)", code, error, severity);
}

##Demo Project Open the Xcode project inside the SQLClient folder.

##Installation

###CocoaPods

CocoaPods is the preferred way to install this library.

  1. Open a Terminal window. Update RubyGems by entering: sudo gem update --system. Enter your password when prompted.
  2. Install CocoaPods by entering sudo gem install cocoapods.
  3. Create a file at the root of your Xcode project folder called Podfile.
  4. Enter the following text: pod 'SQLClient', '~> 0.1.3'
  5. In Terminal navigate to this folder and enter pod install.
  6. You will see a new SQLClient.xcworkspace file. Open this file in Xcode to work with this project from now on.

###Manual

  1. Drag and drop the contents of the SQLClient/SQLClient/SQLClient folder into your Xcode project.
  2. Select Copy items into destination group's folder (if needed).
  3. Go to Project > Build Phases > Link Binary With Libraries.
  4. Click + and add libiconv.dylib.

##Documentation

SQLClient Class Reference

SQLClient: A Native Microsoft SQL Server Library for iOS

##Credits

FreeTDS: http://www.freetds.org

FreeTDS-iOS: https://github.com/patchhf/FreeTDS-iOS

FreeTDS example code in C: http://freetds.schemamania.org/userguide/samplecode.htm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.