dart_mssql 0.1.0+5

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new73

dart_mssql #

High Performance Microsoft SQL Server Driver for Dart (32 & 64bits)

Important #

  • Works only on Windows (32bits or 64bits)
  • You have to install OLE DB Driver
  • You have to install Microsoft Visual C++ Redistributable
  • dart_mssql_32.dll (32-bit) and dart_mssql_64.dll (64-bit) are the compiled versions of the driver. Rename to "dart_mssql.dll" according to your needs and copy it to the main directory of your project.

Example Usage #

Demo code to perform Raw SQL queries

import 'package:dart_mssql/dart_mssql.dart';

void main() async {
  MssqlConnection connection = MssqlConnection("SERVERNAME", "DBNAME", "USERNAME", "PASSWORD");
  int id = 1;
  String cmd = "select * from nacionalidade where id_nacionalidade=$id"; // sorry! param binding not yet implemented!

  SqlResult result = await connection.execute(cmd);
  print("${result.rows.toString()}");
}

Troubleshooting #

Problem:
The specified module could not be found.
error: library handler failed

Cause:
Missing installing Microsoft OLE DB Driver OR missing dart_mssql.dll file into project main directory OR missing Microsoft Visual C++ Redistributable

Solution:
Copy dart_mssql.dll file into project main directory.


Problem:
%1 is not a valid Win32 application.
error: library handler failed

Cause:
incorrect dart_mssql.dll version (32 bits with dart VM 64 bits or vice versa)

Solution:
Copy correct dart_mssql.dll file into project main directory.


Compile with Microsoft Visual Studio 2017 Community Edition #

  • Before compile, you have to install Windows 10 SDK on your Microsoft Visual Studio 2017 Community Edition
  • Open solution file dart_mssql\cpp\dart_mssql.sln with Microsoft Visual Studio 2017 Community Edition
  • On "Solution Explorer" Panel right click on dart_mssql project and select "Rebuild"
  • Put the generated dart_mssql.dll file into your project main folder (same folder of your pubspec.yaml file)
  • Be sure to have correct dart-sdk\bin folder (32 or 64 bits) in VC++ Directories -> Library Directories. Change "F:\DartSDK64\dart-sdk\bin" to your location
  • Be sure to have correct dart.lib version (32 or 64 bits) in Linker -> Input -> Additional Dependencies. Change "F:\DartSDK64\dart-sdk\bin\dart.lib" to your location

[0.0.1] - Initial Release

  • Microsoft SQL Server Driver for Dart (32 & 64bits) initial release.

example/main.dart

import 'dart:io';
import 'package:dart_mssql/dart_mssql.dart';

void main() async {
  MssqlConnection connection = MssqlConnection("SERVERNAME", "DBNAME", "USERNAME", "PASSWORD");
  int id = 1;
  String cmd = "select * from nacionalidade where id_nacionalidade=$id"; // sorry! param binding not yet implemented!

  SqlResult result = await connection.execute(cmd);
  result.rows.forEach((e) {
    print("${e.toString()}");
  });
  stdin.readLineSync();
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dart_mssql: ^0.1.0+5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dart_mssql/dart_mssql.dart';
  
Version Uploaded Documentation Archive
0.1.0+5 Feb 15, 2019 Go to the documentation of dart_mssql 0.1.0+5 Download dart_mssql 0.1.0+5 archive
0.1.0+4 Feb 12, 2019 Go to the documentation of dart_mssql 0.1.0+4 Download dart_mssql 0.1.0+4 archive
0.1.0+3 Feb 12, 2019 Go to the documentation of dart_mssql 0.1.0+3 Download dart_mssql 0.1.0+3 archive
0.1.0+2 Feb 10, 2019 Go to the documentation of dart_mssql 0.1.0+2 Download dart_mssql 0.1.0+2 archive
0.1.0+1 Feb 8, 2019 Go to the documentation of dart_mssql 0.1.0+1 Download dart_mssql 0.1.0+1 archive
0.1.0 Feb 8, 2019 Go to the documentation of dart_mssql 0.1.0 Download dart_mssql 0.1.0 archive
0.0.5+1 Feb 8, 2019 Go to the documentation of dart_mssql 0.0.5+1 Download dart_mssql 0.0.5+1 archive
0.0.5 Jan 29, 2019 Go to the documentation of dart_mssql 0.0.5 Download dart_mssql 0.0.5 archive
0.0.4 Jan 29, 2019 Go to the documentation of dart_mssql 0.0.4 Download dart_mssql 0.0.4 archive
0.0.3 Jan 29, 2019 Go to the documentation of dart_mssql 0.0.3 Download dart_mssql 0.0.3 archive

All 12 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Feb 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13

Platforms

Detected platforms: other

Primary library: package:dart_mssql/dart_mssql.dart with components: isolate, nativewrappers.

Health issues and suggestions

Document public APIs. (-1 points)

33 out of 33 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
quiver >=2.0.0 <3.0.0 2.0.1
Transitive dependencies
matcher 0.12.4
meta 1.1.7
path 1.6.2
stack_trace 1.9.3
Dev dependencies
pedantic ^1.0.0