From Lesta@t-online.de  Sat Jan 15 21:46:04 2000
Received: from mailout02.sul.t-online.de (mailout02.sul.t-online.de [194.25.134.17])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id VAA15282
	for <prolog@swi.psy.uva.nl>; Sat, 15 Jan 2000 21:46:04 +0100 (MET)
Received: from fwd05.sul.t-online.de 
	by mailout02.sul.t-online.de with smtp 
	id 129a5O-0008Jk-03; Sat, 15 Jan 2000 21:46:14 +0100
Received: from t-online.de (05121269112-0001@[62.158.101.141]) by fwd05.sul.t-online.de
	with esmtp id 129a5E-0okthAC; Sat, 15 Jan 2000 21:46:04 +0100
Message-ID: <3880DB9E.70164885@t-online.de>
Date: Sat, 15 Jan 2000 21:42:06 +0100
From: Lesta@t-online.de (Uwe Lesta)
X-Mailer: Mozilla 4.05 [de]C-DT  (Win95; I)
MIME-Version: 1.0
To: "Douglas Miles (Volt Computer)" <a-doug@microsoft.com>
CC: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Subject: Re: SQL Interfaces?
References: <E713F2760348D211A9B600805F6FA1AB03559942@RED-MSG-09.itg-messaging.redmond.corp.microsoft.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Sender: 05121269112-0001@t-dialin.net

Douglas Miles (Volt Computer) schrieb:
> 
> Previously I remember seeing some interest in interfacing prolog to an SQL
> database..
> Might be a delusion.. But I have made some people very interested in using
> prolog for some company apps.
> After much discussion we have decided to keep our prolog code in a shared
> SQL database.. and are going to hook unknown predicate calls to a global
> broadcast that will incite a Prolog-SQL "listener" to give back a proper
> predicate definition much like INDEX.pl :).. ( you can see how convenient
> this will be for mining or holding large volumes of information in our
> server clusters)
> Presently we are looking for an NT solution.. but UNIX over a tcp socket
> suits me just fine.. In have been writing prolog_to_sql queries and
> sql_to_prolog but only on query syntax levels not at the "connection".
> Unfortunately C is my weakest language out of 10 and there has been
> suggestions that we do it in that. However I am just as happy to write it in
> Prolog.. but if someone has already began the effort or just has something I
> can look at .. I would be forever grateful and there is a possibility coming
> for full time employment or an internship.  We just came up with this a
> couple days ago and if your interface is crude or incomplete, its way better
> then nothing and are interested in working with you wherever it starts.

There is olso an ActiveX Interface from	David Hovel (davidhov@microsoft.com)
called swiactx.
I'll use it for Database connection via the ADO and ADOX classes. You can
fetch n-dimensional structures when you connect with the MSDataShape provide or 
write your data as a XML file with the MSPersist provider. And of course there is
also an ODBC provider for ADO.

I'll had modified the file swixcvt.cpp. Now it returns atoms not strings.
I had build XPCE wrapper classes for the most common used ADO classes and methods
but it is also possible in pure prolog.

Send me a mail if you like to have a look at it.
(requires MSVC 6.0, swi-prolog 3.3.0 , xpce 5.0.7) 

May I have a look at your prolog_to_sql and sql_to_prolog translation predicates ?

-- 


Regards

Uwe
Lesta@t-online.de

