On Sat, 22 Jan 2011, Bo Berglund wrote:
On Fri, 21 Jan 2011 17:30:57 +0100 (CET), [email protected]
wrote:
Without the error message, we cannot begin to start looking for a solution.
Michael.
I can now answer that after I have restarted the virtual machine where
I was investigating this:
The error message captured as the Exception.Message is:
'Cannot open a non-select statement'
Attached is a possible patch. I don't have MS-SQL (doesn't run on Linux) so I
can't test.
Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and report whether this helped you
solve your problem. If so, I will commit it to SVN.
Michael.
Index: sqldb.pp
===================================================================
--- sqldb.pp (revision 16285)
+++ sqldb.pp (working copy)
@@ -487,10 +487,13 @@
var T : TStatementType;
begin
+ result:=stnone;
S:=Lowercase(s);
For t:=stselect to strollback do
if (S=StatementTokens[t]) then
Exit(t);
+ if (result=stNone) and (s='exec') then // MS-SQL does not use EXECUTE
+ result:=stExecProcedure
end;
procedure TSQLConnection.SetTransaction(Value : TSQLTransaction);
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus