Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 18th, 2004, 05:27 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default SQL server connection problem

Hello friends,

   I have downloaded SQL server 2000 eval from microsoft site. And i installed in my win 2000 server. I have created one user named "raj"

conn.connectionstring="Provider=SQLOLEDB.1;Integra ted Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind;Data Source=RAJANI;"

its giving error that connection failed "raj" not associated with trusted sql server connection.
Whats it?

I want to assign the user(raj and password) to my database and connect thru ASP. How can i do?

Thanx in advance

 
Old February 18th, 2004, 08:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Its because you have 'Integrated Security=SSPI' in your conn string - this tells it to connect as the Windows user who is running the code. For a SQL Server login you need a slightly different connection string, like this:
conn.connectionstring="Provider=SQLOLEDB.1;User Id=raj;Password=myPassword;Initial Catalog=Northwind;Data Source=RAJANI;"

Also, make sure your SQL Server is configured to allow SQL Server logins, not just Windows logins. You can do this from Enterprise Manager by right-clicking the server, choosing properties, looking at the 'Security' tab and make sure the Authentication is set to 'SQL Server and Windows'





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql server 2005 connection problem Mahenj C# 2005 17 April 20th, 2015 12:12 AM
SQL Server Connection and Database Problem workib C# 1 November 13th, 2008 03:26 PM
Problem with my sql server express connection saif44 ASP.NET 2.0 Basics 9 June 13th, 2006 05:07 PM
sql server connection problem in msde oldbig89 SQL Server 2000 1 February 8th, 2006 05:46 PM
Problem with SQL SERVER Connection String Non Linear BOOK: Beginning ASP 3.0 3 October 20th, 2005 12:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.