Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeTDS bindings #5

Open
neonile opened this issue Mar 30, 2016 · 3 comments
Open

FreeTDS bindings #5

neonile opened this issue Mar 30, 2016 · 3 comments

Comments

@neonile
Copy link

neonile commented Mar 30, 2016

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

@neonile
Copy link
Author

neonile commented Apr 21, 2016

Is there perhaps an ETA on this?

@cruisercoder
Copy link
Owner

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

@cruisercoder
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants