|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQLDMO - What name to use to connect to the default instance?I am using SQLDMO (C++) and trying to connect to the SQL Server default
instance, but I don't know the name to use in the Connect() statement. I've tried: "local" "(local)" "" What should the "name" parameter be when attempting to connect to the default instance using SQLDMO? Many thanks! Hello Mark,
Based on my test, the following string work for local default instance "." "(local)" "computer name" I used the following code: Dim oSQLServer set oSQLServer = WScript.CreateObject("SQLDMO.SQLServer") oSQLServer.Connect "(local)", "sa", "password" WScript.echo "connection successful" Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ===================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- Show quote >From: "Mark Findlay" <mfind***@speakeasy.org> >Subject: SQLDMO - What name to use to connect to the default instance? >Date: Sat, 24 Dec 2005 11:54:49 -0800 >Lines: 15 >MIME-Version: 1.0 >Content-Type: text/plain; > format=flowed; > charset="iso-8859-1"; > reply-type=original >Content-Transfer-Encoding: 7bit >X-Priority: 3 >X-MSMail-Priority: Normal >X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 >Message-ID: <O6zPmPMCGHA.3***@TK2MSFTNGP11.phx.gbl> >Newsgroups: microsoft.public.sqlserver.programming >NNTP-Posting-Host: dsl231-047-121.sea1.dsl.speakeasy.net 216.231.47.121 >Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl >Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.programming:570198 >X-Tomcat-NG: microsoft.public.sqlserver.programming > >I am using SQLDMO (C++) and trying to connect to the SQL Server default >instance, but I don't know the name to use in the Connect() statement. > >I've tried: > >"local" >"(local)" >"" > >What should the "name" parameter be when attempting to connect to the >default instance using SQLDMO? > >Many thanks! > > > |
|||||||||||||||||||||||