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

Marcos Douglas md at delfire.net
Fri Jun 21 21:08:01 CEST 2013

On Fri, Jun 21, 2013 at 3:59 PM, Ludo Brands <ludo.brands at free.fr> wrote:
> 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);

Aff! I would post before you!  :)

You're right I used DBSETID:
  dbsetlname(FDBLogin, PChar('MyApp'), DBSETID);

You think is better use 5 instead DBSETID? The source will change?

Thank you very much!

Marcos Douglas

More information about the fpc-pascal mailing list