Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Bob Barrows" Newsgroups: comp.databases.ms-sqlserver Subject: Re: server connection Date: Fri, 26 Aug 2011 08:10:32 -0400 Organization: A noiseless patient Spider Lines: 38 Message-ID: References: Injection-Date: Fri, 26 Aug 2011 12:09:07 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="inlgCTpOMxujS+VHkVo6dA"; logging-data="20549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OotbJFNS4zsG+uX4c31Ie9i3ncRMFYRg=" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-RFC2646: Format=Flowed; Original X-Antivirus-Status: Clean X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-Antivirus: avast! (VPS 110826-0, 08/26/2011), Outbound message Cancel-Lock: sha1:Y6UVVABzPkB/4gb9lJ7RqMWik+0= X-Priority: 3 X-MSMail-Priority: Normal Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:633 Fabiof wrote: > I have an interesting issue connecting to ms sql server. > > I'm connecting to the server with in a legacy asp application just > fine. The same application has some page in asp but written in > javascript. When I try to connect to the sql server I get the > following error. > > Microsoft OLE DB Provider for SQL Server error '80004005' > > [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or > access denied. > > Here is the connection string. Any help would be appreciated. > > connection_object = Server.CreateObject("ADODB.Connection"); > connection_object.CursorLocation = 3; > connection_object.ConnectionString = "Provider=SQLOLEDB. > 1;Password=xxx;Persist Security Info=True;User ID=xxx;Data Source=. > \SQLEXPRESS;initial catalog=xxxx;" > > connection_object.Open(); > I believe Erland is correct. You could have figured this out using the basic ddebugging technique of assigning the string to a variable and using response.write to view the content of the variable: var cstr = "Provider=SQLOLEDB. 1;Password=xxx;Persist Security Info=True;User ID=xxx;Data Source=. \SQLEXPRESS;initial catalog=xxxx;"; Response.Write(cstr); connection_object.Open(cstr); Doing so would have made you realize you have a javascript problem rather than a sql server problem and allowed you to decide to post your question to a javascript group instead.