On Fri, Jun 21, 2013 at 2:25 PM, Ludo Brands <ludo.bra...@free.fr> wrote: > On 06/21/2013 04:14 PM, Marcos Douglas wrote: >> On Fri, Jun 21, 2013 at 10:38 AM, Marcos Douglas <m...@delfire.net> wrote: >>> Hi, >>> >>> Is possible to use "instance name" in host connection like bellow? >>> server001\instanceABC >>> >>> I'm using FPC 2.6.2 >>> >>> Thanks, >>> Marcos Douglas >> >> The error is: >> Error 20002 >> Adaptive Server connection failed >> > > This should work. Can you connect with another client using the > instance? tsql? > > I have encountered this problem with sql server when the SQL Server > Browser service is not started. The name is a bit confusing because it > is needed for clients to be able to contact with a named instance. If > this service is down, you can only connect with a port number. It > listens normally on port port 1434 and responds with the port number for > the instance. > > Another option is to define the connection in freetds.conf. Something like > [myserver001] > host = server001 > instance = instanceABC > tds version = 8.0 >
I can specify the version? I'm using MSSQL 2008 The freetds.conf file has priority to set configurations even if the mssqlconn has this? dbsetlversion(FDBLogin, DBVERSION[IsSybase]); > Don't specify a port when you specify an instance. They are mutually > exclusive. Ok. 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? Thanks, Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal