SQL Access Denied

Results 1 to 4 of 4

Thread: SQL Access Denied

  1. #1
    DBNewbie Guest

    Default SQL Access Denied

    Hi all,<BR><BR>I am working on ASPs using a SQL backend, Windows 2000.<BR><BR>I have configured and tested my DSN, and tested successfully.<BR><BR> I created a new project in Visual Interdev (not sure if this is relevant, but I&#039;m providing all my steps), and my connection string is as follows:<BR><BR>set conn = server.createobject("ADODB.connection")<BR>conn.Op en "DSN=myconnection;UID=Administrator;PWD=newpass"<B R><BR>I opted for Windows network authentication; and UID and pass is what I use to log into my machine.<BR><BR>I have gotten this error:<BR><BR>SQL Server does not exist or access denied<BR><BR>Do I need to create a network user in SQL? This is driving me nuts any help is really apprciated... Thanks in Advance<BR><BR>DBNewbie

  2. #2
    BAM Guest

    Default RE: SQL Access Denied

    Have you tried using the SQL authentication? Instead of using the DSN just use this:<BR><BR>set db = server.CreateObject("adodb.connection")<BR>db.open "Driver=SQL Server;Server=;UID=sa;PWD=whatever;Da tabase=whatever;"<BR><BR>Here&#039;s a tip: Once you get that working. Make a page called db.asp and just put the above code in it (within the &#060;% %&#062;) and just include that in all of your pages (&#060;!--#include file=../db.asp--&#062;)That way if you db ever changes you only have to change it in one place.<BR>

  3. #3
    DBNewbie Guest

    Default RE: SQL Access Denied

    Thanks! That did the trick... I also modified the site permissions under MMC...<BR><BR>But I have a question: shouldnt me creating my DSN take care of the Driver, server, etc.? Would that be easier than creating an include file?<BR><BR>Again, Thanks a ton!

  4. #4
    BAM Guest

    Default RE: SQL Access Denied

    Not in my opinion. But I&#039;m sure there are some that would differ. The DSN would work fine in your design environment but you would have to change it all up when you publish your site. It&#039;s a lot less code doing it this way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts