Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

login to SQL server7 failed ODBC and ASP

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I'm trying to connect to SQL server 7<br>I created the ODBC Machine DSN on the server where the .asp is runnign I'm using IIS 4<br>here is the result page<br>-------------------------------<br>Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' <br><br>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'SBSDOMAIN\IUSR_SMALLBSERVER'. <br><br>/test2.asp, line 15 <br>-----------------------<br>Line 15 is the connect line:<br>Conn.Open &quot;People&quot;<br><br>Any Ideas???<br><br>I have an Access database that I wrote a similar test page for and it works just fine.<br>TIA<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
It looks like that user doesn't have access to that database. Do you have a code snip?<br><br>Jeff Turner
 
here is my code: this a .ASP document<br>----------------------------<br>&lt;%@ Language=VBScript %&gt; <br>&lt;html&gt;<br><br>&lt;head&gt;<br>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1252&quot;&gt;<br>&lt;meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 4.0&quot;&gt;<br>&lt;meta name=&quot;ProgId&quot; content=&quot;FrontPage.Editor.Document&quot;&gt;<br>&lt;title&gt;New Page 2&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>&lt;%&nbsp;&nbsp;Response.Write(&quot;These records are pulled from a SQL Server database&quot;)&nbsp;&nbsp;%&gt; <br>&lt;%<br>Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)<br>Conn.Open &quot;People&quot;<br>Set RS = Conn.Execute(&quot;SELECT * FROM Persons&quot;)<br>If Not RS.EOF Then<br>Do<br>Response.Write RS(&quot;PersonFName&quot;) & &quot; &quot; & RS(&quot;PersonLName&quot;)<br>RS.Movenext<br>Loop Until RS.EOF<br>Else<br>msgbox &quot;Empty Baby&quot;<br>End If<br>%&gt;<br>&lt;/body&gt;<br><br>&lt;/html&gt;<br>-------------------------------------<br>here is the result page<br>-------------------------------------<br><br>These records are pulled from a SQL Server database <br>Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' <br><br>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'SBSDOMAIN\IUSR_SMALLBSERVER'. <br><br>/test2.asp, line 15 <br>-----------------------<br>Line 15 is the connect line:<br>Conn.Open &quot;People&quot;<br><br>Any Ideas???<br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Does the user 'SBSDOMAIN\IUSR_SMALLBSERVER' exist? If not try log in with the 'sa' user. It seems that you are using NT trusted security? Make sure you have it configured correctly <p>Cal<br><a href=mailto: > </a><br><a href= > </a><br>
 
IUSR_SMALLBSERVER is a deafult Account set up by NT Smallbusiness BackOffice Server 4.5<br><br>I tried 'sa' and myself and Administrator and on and on.<br>and IUSR_SMALLBSERVER <br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
I figured it out<br>I had the ODBC DSN looking at the wrong Database.<br>since I'm new to SQL server qnd ASP I guess I got confused.<br>Also I have a couple too many test database's laying around. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top