basic connection problems

basic connection problems

am 06.04.2005 06:23:09 von middletree

I have an Intranet-based app at work, and I have it in two places there: a
dev machine and a production box. In both cases, the ASP files and SQL
Server database are on the same box. I have it running smoothly in both
places at work.

However, I've been trying to set it up at home, and cannot make the SQL
Server connection work for some reason. I've been working on this off and on
for weeks, and I just don't get what I am missing.

First, my code:

which points to a page contaning only the followig lines:

=======================
<%
Dim strDBConnection
strDBConnection = _
"Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"Data Source=w2003\ticketlog;" & _
"User ID=asp;" & _
"Password=asp;" & _
"Database=argonet;"
Dim objConnection
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open strDBConnection
%>
==============================


It's at this point that I should add that this code is just like the working
code from my stuff at work. Only the names have been changed. I should also
add that here at home, the machine I am working on has been named "W2003",
so when I set up SQL Server, it named the instance W2003\TICKETLOG.(Windows
NT). Yes, it has that part with the aprentheses. I don't think the slash
is the problem.

Anyway, here is the message I see in the browser when I try to get to any
page which calls this connection code.


====================================
Microsoft OLE DB Provider for SQL Server error '80040e4d'
Login failed for user 'asp'.
/ticketlog/includes/argodbinc.asp, line 15
====================================

Ok, so pretend I have never done any of this before. What steps do I need to
set up this thing? In my case, I did add a user named asp and gave full
permissions, but assume I haven't done that. Perhaps with detailed
hand-holding instructions, I'll see what I am missing.

thanks

Re: basic connection problems

am 06.04.2005 06:42:50 von middletree

I should add that this is on SQL Server 2000, both for the machines that
work, and the one that gives the error.

Re: basic connection problems

am 07.04.2005 03:55:19 von middletree

Anyone? Any help would be appreciated.



"middletree" wrote in message
news:ezkGYBmOFHA.576@TK2MSFTNGP15.phx.gbl...
> I have an Intranet-based app at work, and I have it in two places there: a
> dev machine and a production box. In both cases, the ASP files and SQL
> Server database are on the same box. I have it running smoothly in both
> places at work.
>
> However, I've been trying to set it up at home, and cannot make the SQL
> Server connection work for some reason. I've been working on this off and
on
> for weeks, and I just don't get what I am missing.
>
> First, my code:
>
> which points to a page contaning only the followig lines:
>
> =======================
> <%
> Dim strDBConnection
> strDBConnection = _
> "Provider=SQLOLEDB;" & _
> "Persist Security Info=False;" & _
> "Data Source=w2003\ticketlog;" & _
> "User ID=asp;" & _
> "Password=asp;" & _
> "Database=argonet;"
> Dim objConnection
> Set objConnection = Server.CreateObject("ADODB.Connection")
> objConnection.Open strDBConnection
> %>
> ==============================
>
>
> It's at this point that I should add that this code is just like the
working
> code from my stuff at work. Only the names have been changed. I should
also
> add that here at home, the machine I am working on has been named "W2003",
> so when I set up SQL Server, it named the instance
W2003\TICKETLOG.(Windows
> NT). Yes, it has that part with the aprentheses. I don't think the slash
> is the problem.
>
> Anyway, here is the message I see in the browser when I try to get to any
> page which calls this connection code.
>
>
> ====================================
> Microsoft OLE DB Provider for SQL Server error '80040e4d'
> Login failed for user 'asp'.
> /ticketlog/includes/argodbinc.asp, line 15
> ====================================
>
> Ok, so pretend I have never done any of this before. What steps do I need
to
> set up this thing? In my case, I did add a user named asp and gave full
> permissions, but assume I haven't done that. Perhaps with detailed
> hand-holding instructions, I'll see what I am missing.
>
> thanks
>
>

Re: basic connection problems

am 07.04.2005 17:19:23 von Jim in Arizona

> First, my code:
>
> which points to a page contaning only the followig lines:
>
> =======================
> <%
> Dim strDBConnection
> strDBConnection = _
> "Provider=SQLOLEDB;" & _
> "Persist Security Info=False;" & _
> "Data Source=w2003\ticketlog;" & _
> "User ID=asp;" & _
> "Password=asp;" & _
> "Database=argonet;"
> Dim objConnection
> Set objConnection = Server.CreateObject("ADODB.Connection")
> objConnection.Open strDBConnection
> %>
> ==============================
>
>
> It's at this point that I should add that this code is just like the
> working
> code from my stuff at work. Only the names have been changed. I should
> also
> add that here at home, the machine I am working on has been named "W2003",
> so when I set up SQL Server, it named the instance
> W2003\TICKETLOG.(Windows
> NT). Yes, it has that part with the aprentheses. I don't think the slash
> is the problem.
>
> Anyway, here is the message I see in the browser when I try to get to any
> page which calls this connection code.
>
>
> ====================================
> Microsoft OLE DB Provider for SQL Server error '80040e4d'
> Login failed for user 'asp'.
> /ticketlog/includes/argodbinc.asp, line 15
> ====================================


Assuming you don't have more than one instance of SQL installed and that
you're running your web server on the same machine, then perhaps try a
slighty different connection sting? I use this to connect to my SQL DBs.

Dim Conn

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={SQL
Server};Server=localhost;Database=argonet;Uid=asp;Pwd=asp;"

Then execute your SQL strings with Conn.Execute

I'm not expert but I hope this helps in some way.

Jim

Re: basic connection problems

am 07.04.2005 18:52:36 von middletree

OK, I'll try it when I get home tonight.

Thanks


"Jim in Arizona" wrote in message
news:#xKNEU4OFHA.2468@tk2msftngp13.phx.gbl...

> Assuming you don't have more than one instance of SQL installed and that
> you're running your web server on the same machine, then perhaps try a
> slighty different connection sting? I use this to connect to my SQL DBs.
>
> Dim Conn
>
> Set Conn = Server.CreateObject("ADODB.Connection")
> Conn.Open "Driver={SQL
> Server};Server=localhost;Database=argonet;Uid=asp;Pwd=asp;"
>
> Then execute your SQL strings with Conn.Execute
>
> I'm not expert but I hope this helps in some way.
>
> Jim
>
>