On Fri, Jun 21, 2013 at 3:59 PM, Ludo Brands <ludo.bra...@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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal