Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #630

Re: server connection

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: server connection
Date Fri, 26 Aug 2011 07:29:02 +0000 (UTC)
Organization Erland Sommarskog
Lines 35
Message-ID <Xns9F4D6079F56BDYazorman@127.0.0.1> (permalink)
References <bdedf611-d8d5-4556-9872-efbf714be613@o9g2000vbo.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Date Fri, 26 Aug 2011 07:29:02 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="G7+Jz22XqYCG8C6rb1H3YA"; logging-data="20733"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pgTXnm6beFsSpVzD3upZc"
User-Agent Xnews/2005.10.03 Mime-proxy/1.4.c.4 (Win32)
Cancel-Lock sha1:4LmNvTxNCQwH5X0s8bP0ekvmQdM=
Xref x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:630

Show key headers only | View raw


Fabiof (fabio.folino@gmail.com) writes:
> 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();
 
So this is the Javascript code? I don't know Javascript, but in some
languages \ is used as an escape character, why you need to double it
if you want to includee as-is. That is, try:

   Data Source=.\\SQLEXRESS


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

server connection Fabiof <fabio.folino@gmail.com> - 2011-08-25 18:22 -0700
  Re: server connection Erland Sommarskog <esquel@sommarskog.se> - 2011-08-26 07:29 +0000
  Re: server connection "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2011-08-26 08:10 -0400
    Re: server connection Mark D Powell <Mark.Powell2@hp.com> - 2011-08-31 13:03 -0700
      Re: server connection Henk van den Berg <me@myplace.net> - 2011-09-01 17:55 +0200

csiph-web