[eclipse-clp-users] Dbi prepare query issue.

From: Edgaonkar, Shrirang <Shrirang.Edgaonkar_at_nttdata.com>
Date: Tue, 8 Mar 2016 04:28:08 +0000
Dear clp users,



  I am facing a problem with prepare statement in 32 bit as well as 64 bit Windows OS using respective ECLipSe.

Eclipse version is 6.1 217. Kindly let me know what could be wrong. Please find the console output at the end of the email.



:- lib(dbi).
:- lib(ic).
solveDB(Result):-
    Result2 :: 1..10,
    Template = count(24),
    session_start("blah"@"blah<mailto:"blah"@"blah>", "blah", [dbname:"blah"], Session),
 writeln("TEST"),
    SQL = "select count(column) from table where column > ?",
 writeln("TEST1"),
    session_sql_prepare(Session, Template, SQL, Cursor),
 writeln([Cursor,"TEST2"]),
 Result1 = count(Result2),
    cursor_next_execute(Cursor, Result1),
 writeln(Result1),
    cursor_close(Cursor).



----------------------------------------------------------------------------------------------------------------



console output:-



TEST
TEST1
[cursor('MySQLC'(16'327ee0), 'MySQLS'(16'327e40)), TEST2]
DBI General exception Code:-5 in cursor_next_exec(cursor('MySQLC'(16'327ee0), 'M
ySQLS'(16'327e40)), count(_138309), options(_138404, _138405, "client", "read_on
ly"))
DBI-005: bad template
Aborting execution ...
abort

Thanks and Regards,

Shrirang Edgaonkar



______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.
Received on Tue Mar 08 2016 - 04:48:44 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 09 2016 - 00:13:13 CET