unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Best way to talk to MS SQL server from guile?
@ 2015-10-24  9:17 Jamil Egdemir
  2015-10-26 11:08 ` tomas
  0 siblings, 1 reply; 4+ messages in thread
From: Jamil Egdemir @ 2015-10-24  9:17 UTC (permalink / raw)
  To: guile-user

Hi Everyone,

I need to connect to an instance of MS SQL Server from guile and I'm
looking for the best way to do so.  I'm inside cygwin on a windows box
and working with freetds and iodbc.  (unixodbc is an option too if
necessary and I have experience using it but let's just say for now it's
iodbc.)

I first started poking around for anything that mentioned guile and odbc
or guile and freetds but no such luck.  

So my question is, how do those of you who are trapped on a windows box
talk to MS SQL server when coding with guile?

-jamil


--
-------------------------------------------------------------
Jamil Egdemir
unclejamil@gmail.com
http://www.power-quant.org
(631) 338-3170 (cell)

Help support the Free Software Movement!
http://www.gnu.org/
-------------------------------------------------------------




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Best way to talk to MS SQL server from guile?
  2015-10-24  9:17 Best way to talk to MS SQL server from guile? Jamil Egdemir
@ 2015-10-26 11:08 ` tomas
  2015-10-26 12:17   ` Jamil Egdemir
  0 siblings, 1 reply; 4+ messages in thread
From: tomas @ 2015-10-26 11:08 UTC (permalink / raw)
  To: guile-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Oct 24, 2015 at 05:17:13AM -0400, Jamil Egdemir wrote:
> Hi Everyone,
> 
> I need to connect to an instance of MS SQL Server from guile and I'm
> looking for the best way to do so.  I'm inside cygwin on a windows box
> and working with freetds and iodbc.  (unixodbc is an option too if
> necessary and I have experience using it but let's just say for now it's
> iodbc.)
> 
> I first started poking around for anything that mentioned guile and odbc
> or guile and freetds but no such luck.  
> 
> So my question is, how do those of you who are trapped on a windows box
> talk to MS SQL server when coding with guile?

I guess, based on the lack of responses, that there's no such thing.

For a one-off job, I'd try to call tsql as a sub-process and parse
its output; for a more robust and durable solution, a binary interface
to the FreeTDS libraries might be the right thing to do.

(Alas, I have no MS SQL database I could play around with... without
getting fired, that is :-)

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYuCb8ACgkQBcgs9XrR2kYjLwCfUwgnfb06BdAxa+wELhVUz43P
vdsAn10BwdZRXu+lrdNNyKDaIG5ts/bl
=sWl0
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Best way to talk to MS SQL server from guile?
  2015-10-26 11:08 ` tomas
@ 2015-10-26 12:17   ` Jamil Egdemir
  2015-10-26 13:19     ` tomas
  0 siblings, 1 reply; 4+ messages in thread
From: Jamil Egdemir @ 2015-10-26 12:17 UTC (permalink / raw)
  To: guile-user


tomas@tuxteam.de writes:

> I guess, based on the lack of responses, that there's no such thing.

Seems so.  I spent some time lurking on #guile with irc asking around.
After a while Dave Thompson jumped in and suggested I fire up the FFI
and wrap some C libraries.  

> For a one-off job, I'd try to call tsql as a sub-process and parse
> its output; for a more robust and durable solution, a binary interface
> to the FreeTDS libraries might be the right thing to do.

After poking around in the FFI docs in the manual it seems like that's
the way to go.  Doesn't seem so hard.  So far I've made a few C
functions to play around with and used pointer->procedure and
dynamic-link to pull them into guile.  Seems to be working well.  Next
step is to attempt the same with FreeTDS and iODBC (or unixodbc..)

> (Alas, I have no MS SQL database I could play around with... without
> getting fired, that is :-)

omg... I'm trapped in windows world right now and longing for my
beautiful postgres.  

I'll keep at it though.  Thanks for the advice in any case T.  Godd to
know I'm on the right track.  Much appreciated!

-j

--
-------------------------------------------------------------
Jamil Egdemir
unclejamil@gmail.com
http://www.power-quant.org

Help support the Free Software Movement!
http://www.gnu.org/
-------------------------------------------------------------




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Best way to talk to MS SQL server from guile?
  2015-10-26 12:17   ` Jamil Egdemir
@ 2015-10-26 13:19     ` tomas
  0 siblings, 0 replies; 4+ messages in thread
From: tomas @ 2015-10-26 13:19 UTC (permalink / raw)
  To: Jamil Egdemir; +Cc: guile-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Oct 26, 2015 at 08:17:45AM -0400, Jamil Egdemir wrote:
> 
> tomas@tuxteam.de writes:
> 
> > I guess, based on the lack of responses, that there's no such thing.
> 
> Seems so [...]

> omg... I'm trapped in windows world right now and longing for my
> beautiful postgres.  

Pity you -- send you a bar of chocolate or something? :-)

> I'll keep at it though.  Thanks for the advice in any case T.  Godd to
> know I'm on the right track.  Much appreciated!

Great! Who knows, perhaps I'm let near the corporate databases some day,
then I'll help with testing.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYuKFIACgkQBcgs9XrR2kbBqgCfQUcSlImd6B9u7MDDp5HI23sc
BfIAoIH4XiMharEDcCnCUVfGm4HW6eCd
=iOii
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-26 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-24  9:17 Best way to talk to MS SQL server from guile? Jamil Egdemir
2015-10-26 11:08 ` tomas
2015-10-26 12:17   ` Jamil Egdemir
2015-10-26 13:19     ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).