Skip to content
Chris Hughes edited this page Dec 31, 2017 · 6 revisions

Project status

Early-alpha

Project Development

Design points

  • In general worth comparing each type for equivalence with the SqlClient for best practice.
  • In general worth comparing each type for equivalence with the old AseClient for completeness of a drop in replacement.
  • SqlException has an Errors collection containing SqlError objects. It is derived from DbException.
  • We should avoid depending on Linq.
  • Consider running this to eliminate the JIT cost prior to packing the Nuget package: http://www.jackdermody.net/article/Compiling_NET_Core_to_Native

DBMS Support

In theory, since we're implementing TDS 5.0, this client might work with other SAP (Sybase) or Microsoft databases that also support TDS 5.0, however our goal is just for ASE 15.x-16x support, so this is all we're testing with.

Suggested dev reference material for contributers

  • TDS 5.0 Functional Specification Version 3.8
    • There is a newer version of the spec (Version 3.9) -- if you can find a link to this spec, let its existence be known.
  • Sybase.AdoNet4.AseClient packet captures
    1. Dump the raw TDS packets with this connection string parameter: ProtocolCapture=output-dump-file.tds
    2. Translate to readable text using the 'ribo' utility packaged with Sybase client installation @ C:\Sybase\jutils-XXX\ribo from command line (requires RIBO_HOME and JAVA_HOME env vars): ribo output-dump-file.tds readable-file.txt
    3. This will be immensely useful in translating capability bytes

Running the integration tests

The unit tests should run without any work as they are isolated from an ASE Server dependency. However the integration tests need an ASE Server to work. Once you have one of those, you'll need to add a ConnectionStrings.json file to the root of the AdoNetCore.AseClient.Tests project directory.

The file should be of the form:

{
    "default": "Data Source=[server-name];Port=[port];Database=[Database];Uid=[UserId];Pwd=[Password];",
    "pooled": "Data Source=[server-name];Port=[port];Database=[Database];Uid=[UserId];Pwd=[Password];Pooling=true",
    "big-packetsize": "Data Source=[server-name];Port=[port];Database=[Database];Uid=[UserId];Pwd=[Password];PacketSize=1024;"
}

The specified user will need sufficient permissions to drop and create database objects as well as perform SELECT, INSERT, UPDATE, and DELETE operations on those objects, and to EXEC stored procedures.

The objects themselves and any test data are created by the tests when they execute.

Be sure to add ConnectionStrings.json to your .gitignore file to prevent it from being checked-in.