Re: Need Local Connection String to SQL Server for Classic ASP
- From: GLSmyth <george.smyth@xxxxxxxxx>
- Date: Mon, 23 Feb 2009 05:39:20 -0800 (PST)
Can you explain how to do either of these things (or provide a link)?
I am not very conversant with how to do things on a server. I am not
concerned with security, as this is just on my personal computer and I
am trying to put this together so that I can test my programs without
having to do so on the production server.
Thank you -
george
On Feb 20, 5:03 pm, "Sylvain Lafontaine"
<sylvainlafontaine2...@xxxxxxxx> wrote:
You cannot tell which windows account to use in a connection string. Only
the current user account (and in this case, it would be the account used by
the web server to run the ASP application; most likely this will be either
IUSR_NameOfYourMachine or the IWAM_NameOfYourMachine but it can be something
else depending on your configuration/setup and to use this windows account,
you must specify the parameter Integrated Security=SSPI (or Integrated
Security=TRUE) in your connection string:
"Provider=SQLOLEDB; Data Source = (local); Initial Catalog = Intranet;
Integrated Security=SSPI;"
This means that you must first give access rights to the account that will
be used by IIS (most likely - but not necessarily - either
IUSR_NameOfYourMachine or IWAM_NameOfYourMachine as explained earlier).
An easier solution would be to activate the mixed authentification on your
SQL-Server instance (Windows + SQL-Server Accounts), create a sql-server
account to be used for accessing the database (you can use the sa account
but as this is the super user for SQL-Server, it's not a good idea to keep
going on this way) and use this account in your connection string.
--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain aei ca (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
"GLSmyth" <george.sm...@xxxxxxxxx> wrote in message
news:9cc569f0-99e1-4ac2-9206-85ca90cb83b1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I just installed SQL Server Express 2008 on my machine for testing
purposes. I am using Classic ASP and am having problems figuring out
what the connection string should be. The following is not working:
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog =
Intranet; User Id = ABCD\GSmyth; Password=12345"
The error I am seeing is:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.
I definitely have a database established with SQL Server called
Intranet (converted from Access), so I am assuming that the connection
string is not valid.
the "ABCD\GSmyth" portion of the connection string is what I use for
Windows validation. The database does not have a password. I tried
leaving out the ABCD\ portion, as well as the password and User Id
without success.
Any help with this would be appreciated.
Cheers -
george
.
- Follow-Ups:
- Re: Need Local Connection String to SQL Server for Classic ASP
- From: Sylvain Lafontaine
- Re: Need Local Connection String to SQL Server for Classic ASP
- References:
- Need Local Connection String to SQL Server for Classic ASP
- From: GLSmyth
- Re: Need Local Connection String to SQL Server for Classic ASP
- From: Sylvain Lafontaine
- Need Local Connection String to SQL Server for Classic ASP
- Prev by Date: Re: SQL 200 Dev edition on workgroup will not connect
- Next by Date: Re: Need Local Connection String to SQL Server for Classic ASP
- Previous by thread: Re: Need Local Connection String to SQL Server for Classic ASP
- Next by thread: Re: Need Local Connection String to SQL Server for Classic ASP
- Index(es):
Relevant Pages
|