M
Middletree
I have never really understood connection strings. I'm not sure why, as I'm
a smart guy otherwise, but I cannot make sense of any of the explanations I
have seen out there over the past 7 or so years that I have been doing ASP.
I have somehow just managed to get by with copying existing connections
strings, and making changes until it works.
This time, however, I am at a loss. I have an ASP 3 app, which is on my
local machine (WinXP Pro) for now, but will be uploaded to a real host for
viewing my on a members-only site. It will use SQL Server 2005. I had it
working fine with Access, but I had to move the db over to SQL Server,
because that's what it's going to be in Production.
I have tried variations of the different attempts you can see below. I have
read www.connectionstrings.com and www.aspfaq.com.
I currently have SQL Server set for Windows Authentication. I have no
problem setting it for Mixed Mode, but have not figured out why.
I have verified that IUSR_(machinename) is a user on the machine.
The errors I get, depending on which of the various attempts I make, are
usually some sort of permissions error. Any help appreciated.
strDBConnection = _
"Provider=SQLOLEDB;Persist Security Info=False;Data Source=machinename;" &
_
"User ID=userid;Password=password;Database=1;"
Dim objConnection
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strDBConnection
and
strDBConnection = "Provider=SQLOLEDB;" & _
"Data Source=<machinename>\<SQLEXPRESS>;" & _
"Initial Catalog=<shape>;" & _
"Integrated Security=SSPI"
set conn = CreateObject("ADODB.Connection")
conn.open strDBConnection
and
set db = Server.CreateObject("ADODB.Connection")
strConnect = "Provider=SQLOLEDB; Data Source=machinename; Initial
Catalog=shape; User ID=userid; Password=password; Network Library=dbmssocn;"
and
strConnect = "Provider=SQLOLEDB;Driver=SQL
Server;Server=machinename;Database=shape;"
db.Open strConnect
a smart guy otherwise, but I cannot make sense of any of the explanations I
have seen out there over the past 7 or so years that I have been doing ASP.
I have somehow just managed to get by with copying existing connections
strings, and making changes until it works.
This time, however, I am at a loss. I have an ASP 3 app, which is on my
local machine (WinXP Pro) for now, but will be uploaded to a real host for
viewing my on a members-only site. It will use SQL Server 2005. I had it
working fine with Access, but I had to move the db over to SQL Server,
because that's what it's going to be in Production.
I have tried variations of the different attempts you can see below. I have
read www.connectionstrings.com and www.aspfaq.com.
I currently have SQL Server set for Windows Authentication. I have no
problem setting it for Mixed Mode, but have not figured out why.
I have verified that IUSR_(machinename) is a user on the machine.
The errors I get, depending on which of the various attempts I make, are
usually some sort of permissions error. Any help appreciated.
strDBConnection = _
"Provider=SQLOLEDB;Persist Security Info=False;Data Source=machinename;" &
_
"User ID=userid;Password=password;Database=1;"
Dim objConnection
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strDBConnection
and
strDBConnection = "Provider=SQLOLEDB;" & _
"Data Source=<machinename>\<SQLEXPRESS>;" & _
"Initial Catalog=<shape>;" & _
"Integrated Security=SSPI"
set conn = CreateObject("ADODB.Connection")
conn.open strDBConnection
and
set db = Server.CreateObject("ADODB.Connection")
strConnect = "Provider=SQLOLEDB; Data Source=machinename; Initial
Catalog=shape; User ID=userid; Password=password; Network Library=dbmssocn;"
and
strConnect = "Provider=SQLOLEDB;Driver=SQL
Server;Server=machinename;Database=shape;"
db.Open strConnect