www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D / GtkD for SQL Server

reply John Joyus <john.joyus gmail.com> writes:
I am learning D and itching to create some small tools (basically 
Windows executables) for our internal use, but any tool I think of 
creating also needs some support for SQL Server! So my question is:

1). Does D has any support for MSSQL?

I need the ability to connect to a SQL Server and run a SQL script (the 
script I construct based on user inputs) and capture its return value, 
just a number. (No need to insert or update any records).

Oh, btw, another question, unrelated to the above:

2). If I build with GtkD, it generates about 3.5 MB executable. Does 
this contain everything or do I still have to distribute anything with 
it to make it work on new Windows machines?

Thanks in advance.
Oct 20 2013
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-10-20 10:13, John Joyus wrote:
 I am learning D and itching to create some small tools (basically
 Windows executables) for our internal use, but any tool I think of
 creating also needs some support for SQL Server! So my question is:

 1). Does D has any support for MSSQL?

 I need the ability to connect to a SQL Server and run a SQL script (the
 script I construct based on user inputs) and capture its return value,
 just a number. (No need to insert or update any records).
I would say your best bet is to create bindings to FreeTDS. It's an open source library that can connect to SQL Server. I actually tried to do that once, but I never managed to connect to the server/database, for some reason. I C version worked fine but not when I ported it do D. This is the D version: http://pastebin.com/7tGyytDh This is the tds file: http://pastebin.com/JCA8XQH0 This is the C version: http://pastebin.com/FWJM4B6X You just need to fill in the constants at the top. Please let me know if you get the D version working. -- /Jacob Carlborg
Oct 20 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-10-20 11:37, Jacob Carlborg wrote:

 You just need to fill in the constants at the top. Please let me know if
 you get the D version working.
You need to change the actual SQL select statement as well. -- /Jacob Carlborg
Oct 20 2013
prev sibling next sibling parent reply Mike Wey <mike-wey example.com> writes:
On 10/20/2013 10:13 AM, John Joyus wrote:
 2). If I build with GtkD, it generates about 3.5 MB executable. Does
 this contain everything or do I still have to distribute anything with
 it to make it work on new Windows machines?

 Thanks in advance.
You'll need to have the Gtk+ runtime installed on the machine. -- Mike Wey
Oct 20 2013
parent reply John Joyus <john.joyus gmail.com> writes:
On 10/20/2013 09:39 AM, Mike Wey wrote:
 On 10/20/2013 10:13 AM, John Joyus wrote:
 2). If I build with GtkD, it generates about 3.5 MB executable. Does
 this contain everything or do I still have to distribute anything with
 it to make it work on new Windows machines?

 Thanks in advance.
You'll need to have the Gtk+ runtime installed on the machine.
Thank you all for the responses. Regarding the GUI part, all I really need is a form and a bunch of buttons. Can I do that through pure Windows API in D to create a small stand-alone executable that does everything by itself? If that is possible, any links to an example D code? Thanks.
Oct 20 2013
next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-10-20 19:24, John Joyus wrote:

 Thank you all for the responses.

 Regarding the GUI part, all I really need is a form and a bunch of
 buttons. Can I do that through pure Windows API in D to create a small
 stand-alone executable that does everything by itself?

 If that is possible, any links to an example D code?
You can use DWT: https://github.com/d-widget-toolkit/dwt For examples, just search for SWT. -- /Jacob Carlborg
Oct 20 2013
parent reply John Joyus <john.joyus gmail.com> writes:
On 10/20/2013 01:56 PM, Jacob Carlborg wrote:

 You can use DWT:

 https://github.com/d-widget-toolkit/dwt

 For examples, just search for SWT.
Thanks. Does it need Java runtime on end user's machine?
Oct 20 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-10-21 06:53, John Joyus wrote:

 Thanks. Does it need Java runtime on end user's machine?
No, it's a complete D port. No libraries are necessary except for the system libraries (GTK+ on Linux). -- /Jacob Carlborg
Oct 20 2013
prev sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Sunday, 20 October 2013 at 17:24:30 UTC, John Joyus wrote:
 Regarding the GUI part, all I really need is a form and a bunch 
 of buttons. Can I do that through pure Windows API in D to 
 create a small stand-alone executable that does everything by 
 itself?
yup. I started a thing to do it, but haven't finished it yet https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff Grab the files simpledisplay.d, color,d and minigui.d. Lots of stuff doesn't work, and the stuff that does work is still subject to change... but if all ou need are the basics, it might be good enough as it is. Then compile: dmd yourapp.d simpledisplay.d color.d minigui.d and it should just work. If you avoid phobos throughout your code, you can get stand-alone executables about 230 KB in size. With phobos, you'll probably add 200-700 KB, depending on how much you use. Add " -L/SUBSYSTEM:WINDOWS:5.0" (no quotes) to the command line if you don't want a console window to pop up. If you use a resource and xml manifest, this supports visual theme styles on XP+ too. (search MSDN if you want to learn more) (btw there's also database.d and mssql.d in there that might interest you. mssql.d uses ODBC, but the truth is I've never actually tested it, so I don't know if it even compiles.) minigui.d uses native Windows functions for the most part, if you look at the source, you can see where there's HWNDs and so on (and simpledisplay.d creates the windows and manages the event loop, you can find a WndProc in there), but does its own layout based on min/max size, stretchiness, and a handful of other virtual functions. This is kinda a pain to customize at this point, but it works pretty ok if the default is good for you (fill all available space vertically). The event model is based on javascript, you use widget.addEventListener(type, handler). Here's an example program: import arsd.minigui; void main() { auto window = new MainWindow(); // the constructor often takes a label and a parent auto checkbox = new Checkbox("Useful?", window); // use HorizontalLayouts to put things side-by-side auto field = new HorizontalLayout(window); auto lbl = new TextLabel("Name:", field); auto edit = new LineEdit(field); auto buttonSet = new HorizontalLayout(window); auto cancelButton = new Button("Cancel", buttonSet); auto okButton = new Button("OK", buttonSet); // the triggered event is like click, but also works with keyboard activation // other possible events are click, mouseover, mouseenter, and a few others from javascript, search the minigui.d source for EventType for a list so far cancelButton.addEventListener(EventType.triggered, { window.close(); }); okButton.addEventListener(EventType.triggered, { // checking the checkbox state... if(checkbox.isChecked) // message boxes are done right now with custom windows and are modeless. you actually prolly shouldn't use them, perhaps use the raw Windows function instead auto mb = new MessageBox("You said your name is : " ~ edit.content); // the box's content property gets its text. only ASCII right now, i gotta fix this to use GetWindowTextW instead of A... else auto mb = new MessageBox("You said this is useless, " ~ edit.content); window.close(); }); // run the event loop. it terminates when the last window is closed by your program or by the user. window.loop(); } If it works for you, cool, let me know if there's anything I can do to make it better for you and I'll try to make it happen. There's also DWT you might want to look at, like Jacob said. It is a pretty complete port of the Java SWT toolkit so will probably offer more functionality than my incomplete, minimal file here.
Oct 20 2013
parent reply John Joyus <john.joyus gmail.com> writes:
On 10/20/2013 02:15 PM, Adam D. Ruppe wrote:
 On Sunday, 20 October 2013 at 17:24:30 UTC, John Joyus wrote:
 Regarding the GUI part, all I really need is a form and a bunch of
 buttons. Can I do that through pure Windows API in D to create a small
 stand-alone executable that does everything by itself?
yup. I started a thing to do it, but haven't finished it yet https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff Grab the files simpledisplay.d, color,d and minigui.d. Lots of stuff doesn't work, and the stuff that does work is still subject to change... but if all ou need are the basics, it might be good enough as it is. Then compile: dmd yourapp.d simpledisplay.d color.d minigui.d and it should just work. If you avoid phobos throughout your code, you can get stand-alone executables about 230 KB in size. With phobos, you'll probably add 200-700 KB, depending on how much you use. Add " -L/SUBSYSTEM:WINDOWS:5.0" (no quotes) to the command line if you don't want a console window to pop up. If you use a resource and xml manifest, this supports visual theme styles on XP+ too. (search MSDN if you want to learn more) (btw there's also database.d and mssql.d in there that might interest you. mssql.d uses ODBC, but the truth is I've never actually tested it, so I don't know if it even compiles.)
This is cool! I am able to compile your example. It creates a small 225 KB executable! Btw, I had to comment out the lines that contain TextLabel and the .content in the example code as it fails to compile with following errors: - undefiend identifier TextLabel - no property 'content' for type 'arsd.minigui.LineEdit' I have not tried the database.d and mssql.d files yet. Thanks.
Oct 20 2013
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Monday, 21 October 2013 at 05:14:50 UTC, John Joyus wrote:
 Btw, I had to comment out the lines that contain TextLabel and 
 the .content in the example code as it fails to compile with 
 following errors:
I just added that class yesterday and probably forgot to push to github grab new versions here: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/minigui.d also update simpledisplay.d https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/simpledisplay.d (the Win32 headers that come with phobos are woefully incomplete, so if you do just about any Windows programming, you'll either want to get the win32 bindings or do your own with extern(Windows). I went the the latter to minimize dependencies, but that is only functions as i need them. The more complete bindings are here: http://www.dsource.org/projects/bindings/browser/trunk/win32 ) Anyway, with the new versions, that should compile and then you'll have an easier time labeling your fields and getting the answers out.
Oct 21 2013
parent reply John Joyus <john.joyus gmail.com> writes:
The full example now compiles with those two new files, thanks.

When I run the executable, the edit control shows no usable height. It 
reduced to 0.5 mm, and width goes beyond the window, leaving a scroll bar.

Trying to set its Height and Width in the example program had no effect.

Btw, I have tested this on Windows XP. (I can try the exe on Windows 7 
later today, if that helps).


On 10/21/2013 11:19 AM, Adam D. Ruppe wrote:
 I just added that class yesterday and probably forgot to push to github

 grab new versions here:
 https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/minigui.d


 also update simpledisplay.d
 https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/simpledisplay.d
Oct 21 2013
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Monday, 21 October 2013 at 19:01:11 UTC, John Joyus wrote:
 When I run the executable, the edit control shows no usable 
 height. It reduced to 0.5 mm, and width goes beyond the window, 
 leaving a scroll bar.
oops, it was not supposed to have a scroll bar at all. Fixed, it was a one line change, line 1823, remove the HSCROLL members. New version is on github too.
 Btw, I have tested this on Windows XP. (I can try the exe on 
 Windows 7 later today, if that helps).
I've had some trouble with WinXP and background colors on checkboxes and radioboxes too.... are you seeing that? I couldn't reproduce on Vista or Win7 so I thought it might just be my setup here, but if it is off for you too it must be something more.
Oct 21 2013
parent reply John Joyus <john.joyus gmail.com> writes:
On 10/21/2013 03:29 PM, Adam D. Ruppe wrote:
 oops, it was not supposed to have a scroll bar at all. Fixed, it was a
 one line change, line 1823, remove the HSCROLL members.

 New version is on github too.
That works!
 I've had some trouble with WinXP and background colors on checkboxes and
 radioboxes too.... are you seeing that?
The checkbox in the example looks fine to me on my WinXP. (I haven't used the radioboxes yet. I can confirm that later). I have a couple other things: 1. When I click the OK button, the message dialog pops-up *after* the main window is closed, though the window.close(); line is after the call to the MessageBox.. 2. The controls appear to align to client by default. How do I position them where I want them and with the height and width of my choice. Thanks.
Oct 21 2013
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Monday, 21 October 2013 at 22:23:16 UTC, John Joyus wrote:
 1. When I click the OK button, the message dialog pops-up 
 *after* the main window is closed, though the window.close(); 
 line is after the call to the MessageBox..
that's because the MessageBox class here is implemented as another window with an event loop, so it doesn't stop execution. If you want a message box that stops execution, you should just use the regular Windows call http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx it is available in D if you do this: import core.sys.windows.windows; import std.string : toStringz; MessageBoxA(null, toStringz("You clicked ok."), toStringz("title here"), MB_OK); (or you can use MessageBoxW and toUTF16z instead of toStringz if you need unicode support)
 2. The controls appear to align to client by default. How do I 
 position them where I want them and with the height and width 
 of my choice.
I just added a new thing called StaticLayout that lets you do this: auto window = new MyMainWindow(); auto layout = new StaticLayout(layout); auto btn = new Button("test", layout); btn.x = 100; btn.y = 200; btn.width = 100; btn.height = 50; If the only child of the window is a StaticLayout, you can set the x,y, width, height on each part of it and it will honor that. The method registerMovement() btw is the key here. When it is called, it calls MoveWindow to inform Windows of the updated position. It is called automatically by the function recomputeChildLayout(), which by default, also changes the size and position automatically. The new StaticLayout class overrides recomputeChildLayout to call registerMovement without trying to change things itself. (This is new btw becuase I kinda hate doing manual positioning and wanted the automatic grid to work first. But then I didn't get back to finish the other options when another project took over, so there's a lot of minigui.d that isn't quite done, including this.)
Oct 21 2013
parent reply John Joyus <john.joyus gmail.com> writes:
On 10/21/2013 07:27 PM, Adam D. Ruppe wrote:
 On Monday, 21 October 2013 at 22:23:16 UTC, John Joyus wrote:
 1. When I click the OK button, the message dialog pops-up *after* the
 main window is closed, though the window.close(); line is after the
 call to the MessageBox..
that's because the MessageBox class here is implemented as another window with an event loop, so it doesn't stop execution. If you want a message box that stops execution, you should just use the regular Windows call http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx it is available in D if you do this: import core.sys.windows.windows; import std.string : toStringz; MessageBoxA(null, toStringz("You clicked ok."), toStringz("title here"), MB_OK); (or you can use MessageBoxW and toUTF16z instead of toStringz if you need unicode support)
 2. The controls appear to align to client by default. How do I
 position them where I want them and with the height and width of my
 choice.
I just added a new thing called StaticLayout that lets you do this: auto window = new MyMainWindow(); auto layout = new StaticLayout(layout); auto btn = new Button("test", layout); btn.x = 100; btn.y = 200; btn.width = 100; btn.height = 50; If the only child of the window is a StaticLayout, you can set the x,y, width, height on each part of it and it will honor that. The method registerMovement() btw is the key here. When it is called, it calls MoveWindow to inform Windows of the updated position. It is called automatically by the function recomputeChildLayout(), which by default, also changes the size and position automatically. The new StaticLayout class overrides recomputeChildLayout to call registerMovement without trying to change things itself. (This is new btw becuase I kinda hate doing manual positioning and wanted the automatic grid to work first. But then I didn't get back to finish the other options when another project took over, so there's a lot of minigui.d that isn't quite done, including this.)
That works! Thanks. I have tried the previous example like below, with manual positioning. Having this light weight minigui is very encouraging to me to learn D :) The 99% of my programs demand a basic GUI. And I personally love to create stand-alone tools that do not have a ton of dependencies, esecially anything that doesn't come with Winodws by default. I think Delphi has spoiled me! :) import arsd.minigui; import core.sys.windows.windows; import std.string : toStringz; void main() { auto window = new MainWindow(); // use StaticLayout to position the controls manually (or use HorizontalLayout to put them side-by-side) auto layout = new StaticLayout(window); auto lblName = new TextLabel("Your Name:", layout); lblName.x = 20; lblName.y = 40; auto edtName = new LineEdit(layout); edtName.x = 110; edtName.y = 40; edtName.height = 20; edtName.width = 200; auto cbUseful = new Checkbox("Useful?", layout); cbUseful.x = 110; cbUseful.y = 100; cbUseful.width = 750; cbUseful.height = 25; auto btnOk = new Button("OK", layout); btnOk.x = 20; btnOk.y = 425; btnOk.width = 75; btnOk.height = 25; auto btnClose = new Button("Close", layout); btnClose.x = 110; btnClose.y = 425; btnClose.width = 75; btnClose.height = 25; // the triggered event is like click, but also works with keyboard activation // other possible events are click, mouseover, mouseenter, and a few others from javascript, search the minigui.d source for EventType for a list so far btnOk.addEventListener(EventType.triggered, { if(cbUseful.isChecked) MessageBoxA(null, toStringz(" Thanks for liking MiniGUI"), toStringz("D App with MiniGUI"), MB_OK); else MessageBoxA(null, toStringz(" Thanks for trying MiniGUI"), toStringz("D App with MiniGUI"), MB_OK); window.close(); }); btnClose.addEventListener(EventType.triggered, { if (MessageBoxA(null, toStringz("Are you sure you want to close this application?"), toStringz("D App with MiniGUI"), MB_YESNO | MB_ICONQUESTION) == IDYES) window.close(); }); // run the event loop. it terminates when the last window is closed. window.loop(); }
Oct 21 2013
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Tuesday, 22 October 2013 at 06:33:04 UTC, John Joyus wrote:
 That works! Thanks.
cool. If you need anything more in this, let me know (feel free to email me directly too destructionator gmail.com ) and i'll see what I can do.
 The 99% of my programs demand a basic GUI. And I personally 
 love to create stand-alone tools that do not have a ton of 
 dependencies, esecially anything that doesn't come with Winodws 
 by default.
Yeah, it isn't as commonly used for me (most my programs are actually text or web) but I like lightweight too since it is just so much easier to use on other computers. minigui.d has an (even more incomplete than the Windows parts) implementation on Linux too, but I'm writing that for me and me alone, so it will probably never be great... but can work in a pinch if you ever need that.
Oct 24 2013
parent John Joyus <john.joyus gmail.com> writes:
On 10/24/2013 10:28 PM, Adam D. Ruppe wrote:
 On Tuesday, 22 October 2013 at 06:33:04 UTC, John Joyus wrote:
 That works! Thanks.
cool. If you need anything more in this, let me know (feel free to email me directly too destructionator gmail.com ) and i'll see what I can do.
That is great! Thank you so much for the direct access and willing to develop this further. Right now I am being pulled into different directions at work but I will get back to this in a couple of weeks. Though I am a noob at D right now, I am dreaming of eventually building some killer apps in D. :)
 The 99% of my programs demand a basic GUI. And I personally love to
 create stand-alone tools that do not have a ton of dependencies,
 esecially anything that doesn't come with Winodws by default.
Yeah, it isn't as commonly used for me (most my programs are actually text or web) but I like lightweight too since it is just so much easier to use on other computers.
Another reason I try to avoid external dependencies is, most of my end users (colleagues and clients) are not very computer savvy. For example, I cannot ask them to install Gtk+ on their computers.
 minigui.d has an (even more incomplete than the Windows parts)
 implementation on Linux too, but I'm writing that for me and me alone,
 so it will probably never be great... but can work in a pinch if you
 ever need that.
I understand the minigui is incomplete at this time, but the basic things are working great already. It is pretty fast and stable. And I am good at testing and asking for features that would be useful for all :) I'll be in touch through emails. thanks.
Oct 25 2013
prev sibling next sibling parent "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
On Sunday, 20 October 2013 at 08:13:35 UTC, John Joyus wrote:
 I am learning D and itching to create some small tools 
 (basically Windows executables) for our internal use, but any 
 tool I think of creating also needs some support for SQL 
 Server! So my question is:

 1). Does D has any support for MSSQL?
Look at the OpenDBX bindings: https://github.com/rikkimax/Derelict3-Extras/tree/master/import/derelict/opendbx It supports a lot of databases, including SQL Server. Disclaimer: I didn't use it.
Oct 20 2013
prev sibling parent reply "Gary Willoughby" <dev nomad.so> writes:
On Sunday, 20 October 2013 at 08:13:35 UTC, John Joyus wrote:
 I am learning D and itching to create some small tools 
 (basically Windows executables) for our internal use, but any 
 tool I think of creating also needs some support for SQL 
 Server! So my question is:

 1). Does D has any support for MSSQL?
See here: http://forum.dlang.org/thread/qcxoafwuachwnnwqklom forum.dlang.org
Oct 25 2013
parent reply John Joyus <john.joyus gmail.com> writes:
On 10/25/2013 04:04 AM, Gary Willoughby wrote:

 1). Does D has any support for MSSQL?
See here: http://forum.dlang.org/thread/qcxoafwuachwnnwqklom forum.dlang.org
Thanks for the link, but what I meant by MSSQL is Microsoft SQL Server. Not MySQL.
Oct 26 2013
next sibling parent "Gary Willoughby" <dev nomad.so> writes:
On Sunday, 27 October 2013 at 00:06:35 UTC, John Joyus wrote:
 On 10/25/2013 04:04 AM, Gary Willoughby wrote:

 1). Does D has any support for MSSQL?
See here: http://forum.dlang.org/thread/qcxoafwuachwnnwqklom forum.dlang.org
Thanks for the link, but what I meant by MSSQL is Microsoft SQL Server. Not MySQL.
Ah, of course, i misread.
Oct 27 2013
prev sibling parent reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
On Sunday, 27 October 2013 at 00:06:35 UTC, John Joyus wrote:
 On 10/25/2013 04:04 AM, Gary Willoughby wrote:

 1). Does D has any support for MSSQL?
See here: http://forum.dlang.org/thread/qcxoafwuachwnnwqklom forum.dlang.org
Thanks for the link, but what I meant by MSSQL is Microsoft SQL Server. Not MySQL.
John, It's interesting if you can connect to the MS SQL.
Oct 31 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-10-31 14:47, ilya-stromberg wrote:

 John, It's interesting if you can connect to the MS SQL.
Just use FreeTDS, nothing special about it. See: http://forum.dlang.org/thread/l403bf$139g$1 digitalmars.com#post-l4089g:241723:241:40digitalmars.com -- /Jacob Carlborg
Oct 31 2013
parent reply John J <john.joyus gmail.com> writes:
On 10/31/2013 04:36 PM, Jacob Carlborg wrote:
 On 2013-10-31 14:47, ilya-stromberg wrote:

 John, It's interesting if you can connect to the MS SQL.
Just use FreeTDS, nothing special about it. See: http://forum.dlang.org/thread/l403bf$139g$1 digitalmars.com#post-l4089g:241723:241:40digitalmars.com
Thanks Jacob, I guess I have to compile and distribute a FreeTDS.dll, and it only works for win32
Nov 05 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-11-06 08:28, John J wrote:

 Thanks Jacob,

 I guess I have to compile and distribute a FreeTDS.dll, and it only
 works for win32
FreeTDS works on Posix platforms. I wrote that code on Mac OS X. We use FreeTDS in production, running servers on Linux, every day. -- /Jacob Carlborg
Nov 05 2013
parent reply John J <john.joyus gmail.com> writes:
On 11/06/2013 02:36 AM, Jacob Carlborg wrote:
 On 2013-11-06 08:28, John J wrote:

 Thanks Jacob,

 I guess I have to compile and distribute a FreeTDS.dll, and it only
 works for win32
FreeTDS works on Posix platforms. I wrote that code on Mac OS X. We use FreeTDS in production, running servers on Linux, every day.
Sorry, I meant to say FreeTDS doesn't seem to support 64-bit Windows.
Nov 06 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-11-06 09:03, John J wrote:

 Sorry, I meant to say FreeTDS doesn't seem to support 64-bit Windows.
Aha, that might be the case. Somehow I missed that you needed to run the application on Windows. FreeTDS is mainly to be able to connect to SQL Server on non-Windows platforms. Can't you create bindings to the regular libraries that are used to connect to SQL Sever on Windows? By the way, DWT is a GUI library that works on Windows and Linux. It doesn't require any libraries except the system libraries. No need to distribute GTK+. https://github.com/d-widget-toolkit/dwt -- /Jacob Carlborg
Nov 07 2013