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

Dipl. Phys. Jörg Schläger js at jsdevelop.de
Sun Jan 23 13:53:45 CET 2011


Zitat von Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk>:

> Vincent Snijders wrote:
>> 2011/1/23 Michael Van Canneyt <michael at freepascal.org>:
>>> 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.
>>
>> The comment is not correct, both EXEC and EXECUTE are allowed:
>> http://msdn.microsoft.com/en-us/library/aa258848%28v=sql.80%29.aspx
>
> I suspect that it depends on how the client is connecting, i.e. ADO 
> vs ODBC etc.
>
> I don't use MS SQL Server and I have very little incentive to 
> research it, but when I Googled this last night I found specific MS 
> ODBC information relating to EXECUTE and if I recall correctly to 
> CALL, and did not see anything about EXEC. I also found specific 
> discussion of what API within ODBC could be used for invoking stored 
> procedures in the most efficient way, and I presume that the 
> client-side driver is parsing the start of the query to decide how to 
> handle it.
>

for me, in last 15 years exec works better then execute conneted to MSsql , I found no problem in 

Query.Open; .....; Query.Close;  and  Query.execute; as needed.

and next you might think of using query.SQL.Text := 'EXEC SelectDongleData @@SerialNo=2485'; 

-- 
Dipl. Phys. Jörg Schläger
> -- 
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
>
> [Opinions above are the author's, not those of his employers or colleagues]
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>


----------------------------------------------------------------
Dip. Phys. Jörg Schläger
Auftragsentwicklung Meßtechnik
www.jsdevelop.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110123/7c6d4ffc/attachment-0003.html>


More information about the Lazarus mailing list