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

Bo Berglund bo.berglund at gmail.com
Sun Jan 23 17:15:52 CET 2011


On Sun, 23 Jan 2011 13:53:45 +0100, "Dipl. Phys. Jörg Schläger"
<js at jsdevelop.de> wrote:

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

Tried adding an extra @ to parameter.
Results are as follows:

EXEC SelectDongleData @@SerialNo=2485

'Cannot open a non-select statement'

EXECUTE SelectDongleData @@SerialNo=2485

'Could not execute statement. ODBC error details: LastReturnCode:
SQL_ERROR; Record 1: SqlState: 42000; NativeError: 8145; Message:
[Microsoft][ODBC SQL Server Driver][SQL Server]@@SerialNo is not a
parameter for procedure SelectDongleData.;'


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list