SQL problem with SWI-Prolog
From: fickle (gices_at_lycos.com)
Date: 10/20/04
- Next message: Bart Demoen: "Re: Any Prolog language lawyer out there?"
- Previous message: Jens Kilian: "Re: Any Prolog language lawyer out there?"
- Next in thread: Jan Wielemaker: "Re: SQL problem with SWI-Prolog"
- Reply: Jan Wielemaker: "Re: SQL problem with SWI-Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Oct 2004 20:15:24 -0700
Hello ...
Im trying to use Prolog to make a connection with a database and then
execute an SQL query with a WHERE clause. I am currently using
SWI-Prolog and MS-Access for this. I managed to execute simple SQL
queries but my precidates always fail when i specify a WHERE clause.
The predicate is as follows:
conn :- odbc_connect('credit',_,[alias(ccc),open(once)]),
odbc_prepare(ccc, 'SELECT name, postcode FROM credit_history where ID
= ?', [default], Z, [default]),
odbc_execute(Z, ['3']).
1 ?- conn.
ERROR: odbc_prepare/5: Caught signal 11 (segv)
Basically i got a table named credit_history and i would like to list
the name and postcode of the person whose ID is number 3. Can anybody
help me with this please?
Thanks,
fickle
- Next message: Bart Demoen: "Re: Any Prolog language lawyer out there?"
- Previous message: Jens Kilian: "Re: Any Prolog language lawyer out there?"
- Next in thread: Jan Wielemaker: "Re: SQL problem with SWI-Prolog"
- Reply: Jan Wielemaker: "Re: SQL problem with SWI-Prolog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|