'Trying to connect with local database using Prolog and MySQL Workbench
Can you guide to connect my local database with prolog and dump the tables? I am using MySQL Workbench. can anyone help me?
My code is
use_odbc :- open_wordnet,
disconnect_database().
open_wordnet :- odbc_connect('Data Source=(localhost)\\MSSQLLocalDB;Integrated Security=SSPI;', _,
[ user('root'),
password('welcomesai08@948'),
alias(student),
open(once)
]).
disconnect_database() :- odbc_disconnect(myDB).
And I'm getting error like this..
% consulting c:\sai\sai.pl...
SYNTAX ERROR at sai, near line 2:
use_odbc :- open_wordnet , disconnect_database(
<==== HERE ====>
).
SYNTAX ERROR at sai, near line 11:
disconnect_database(
<==== HERE ====>
) :- odbc_disconnect( myDB ).
% consulted c:\sai\sai.pl in module user, 0 msec 3144 bytes
yes
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
