Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 18th, 2004, 05:27 AM
Friend of Wrox
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
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

Reply With Quote
  #2 (permalink)  
Old February 18th, 2004, 08:22 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

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'
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 05:41 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.