[Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

Marcos Douglas md at delfire.net
Wed Jan 26 12:36:55 CET 2011


On Tue, Jan 25, 2011 at 4:50 PM, José Mejuto <joshyfun at gmail.com> wrote:
> Hello Lazarus-List,
>
> Sunday, January 23, 2011, 12:06:12 PM, you wrote:
>
> MVC> Attached is a possible patch. I don't have MS-SQL (doesn't
> MVC> run on Linux) so I can't test.
> MVC> Please apply it to packages/fcl-db/src/sqldb/sqldb.pp and
> MVC> report whether this helped you
> MVC> solve your problem. If so, I will commit it to SVN.
>
> I think this piece of code is a problem for your patch (last line):
>
> function TCustomSQLQuery.Fetch : boolean;
> begin
>  if not (Fcursor.FStatementType in [stSelect,stExecProcedure]) then
>    Exit;
>
>  if not FIsEof then FIsEOF := not TSQLConnection(Database).Fetch(Fcursor);
>  Result := not FIsEOF;
>  // A stored procedure is always at EOF after its first fetch
>  if FCursor.FStatementType = stExecProcedure then FIsEOF := True;
> end;

Congratulations José, good job!

Marcos Douglas




More information about the Lazarus mailing list