[fpc-pascal] Re: SQLdb: TMSSQLConnection: using Instance name in Host

Ludo Brands ludo.brands at free.fr
Fri Jun 21 20:59:57 CEST 2013


On 06/21/2013 08:01 PM, Marcos Douglas wrote:

> Worked but I have another problem:
> To connect in DB of my client I need to pass the Application Name parameter.
> I tried to use Params property but didn't worked so, I changed the mssqlconn:
> 
>   dbsetlname(FDBLogin, PChar('MyApp'), DBSETAPP);
> 
> But didn't worked... Can you help me?


Params won't work. There are only a few keywords supported by sqldb.

dbsetlname(FDBLogin, PChar('MyApp'), DBSETAPP); should work. Did you put
it before the call to dbopen?

Ah, just found out that DBSETAPP is wrongly defined for FreeTDS.
It should be 5 instead of 4 according to include/sybdb.h.
Try dbsetlname(FDBLogin, PChar('MyApp'), 5);

Ludo




More information about the fpc-pascal mailing list