dstddb icon indicating copy to clipboard operation
dstddb copied to clipboard

FreeTDS bindings

Open neonile opened this issue 8 years ago • 3 comments

It'd be quite helpful to get FreeTDS bindings, to facilitate connectivity to MS SQL Server and Sybase ASE databases.

neonile avatar Mar 30 '16 21:03 neonile

Is there perhaps an ETA on this?

neonile avatar Apr 21 '16 16:04 neonile

It's being worked on currently. I'm expecting to have basic support within the next day or two.

cruisercoder avatar Apr 21 '16 17:04 cruisercoder

I've added basic support for freetds in v.0.0.5. Here's an example (set URI values appropriately):

auto db = createDatabase("freetds://SERVER/DB?username=UN&password=PW); auto result = db.query("SELECT 1,2,'abc'"); foreach (r; result) { for(int c = 0; c != r.columns; ++c) writeln("column: ",c,", value: ",r[c].as!string); }

The server name (SERVER) corresponds to the entry in a freetds configuration file (usually $HOME/.freetds.conf) and it looks like this:

[SERVER] host = 1.2.3.4 port = 1433

Let me know if it works for you on a basic level. If you have any particular features that you want prioritized, let me know. Input binding is one of the big things missing at the moment.

cruisercoder avatar Apr 22 '16 22:04 cruisercoder