[Lazarus] TMSSQLConnection how to specify the server port?

Ondrej Pokorny lazarus at kluug.net
Wed Dec 27 20:52:00 CET 2017


On 27.12.2017 19:00, Bo Berglund via Lazarus wrote:
> But this was not enough, I also had to do the following:
>> constructor TSvnAuditer.Create;
>> begin
>>   FConn := TMSSQLConnection.Create(nil);
>>   FQuery := TSQLQuery.Create(nil);
>>   FTrans := TSQLTransaction.Create(nil);
>>   FConn.Transaction := FTrans;
>>   FQuery.Transaction := FTrans;
>>   FQuery.DataBase := FConn;
>     InitialiseDBLib('dblib.dll'); <== Had to add this
>> end;
> And this required adding dblib to the uses clause.

Strange, I connect to MSSQL without InitialiseDBLib in both 64bit and 
32bit applications. I only add dblib.dll and libiconv.dll to the exe.

Ondrej


More information about the Lazarus mailing list