Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > BOOK: Beginning ASP 3.0
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 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 April 22nd, 2005, 05:39 AM
Registered User
Join Date: Apr 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with SQL SERVER Connection String

I am reading the "Beginning ASP 3.0" and I am in chapter 12, page 475. In Try It Out there is a SQL SERVER connection string that is not working. I take an error page when I am trying to run the page. The error "Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection."

The connection String:

"Provider=SQLOLEDB;Persist Security Info=False;" &_
"UID=sa;Initial Catalog=Movie;" &_
"Initial File Name=C:\Program Files\Microsoft SQL Server\MSSQL\Data\Movie2000.mdf"

What is wrong? It is very annoying when I follow the instructions as somebody tells me and then it is not working.
I have winxp SP2 with IIS 5.1 and an MSDE 2000 that I have installed it from MS OFFICE XP CD

  #2 (permalink)  
Old May 17th, 2005, 07:31 AM
Authorized User
Join Date: Dec 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

I think you missed out the pwd word in the syntex
Try this

Provider=SQLOLEDB;Persist Security Info=False;" &_
"UID=sa;pwd=;Initial Catalog=Movie;" &_
"Initial File Name=C:\Program Files\Microsoft SQL Server\MSSQL\Data\Movie2000.mdf"

But if have passord for sa then type it against pwd

  #3 (permalink)  
Old August 3rd, 2005, 12:26 PM
Authorized User
Join Date: Mar 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

How do you find the User ID and Password? I have the same issue. Only have MSDE installed

  #4 (permalink)  
Old October 20th, 2005, 12:35 AM
Friend of Wrox
Points: 630, Level: 9
Points: 630, Level: 9 Points: 630, Level: 9 Points: 630, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Austin, TX, USA.
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post

It all depends on how you installed the SQL Server. To make it simple to connect from the IIS on the local PC, my SQL Server is a 'local' with Windows authentiation. Then I created a DSN for SQL Server database (see PP. 488 to 492). Finally, code objConn.Open "DSN=SQLdsnName" , instead of a strConnect/DataStore.asp SSI connection.

It worked well for me on Movie2000 SQL Server database, which I imported from the Access Movie2000.

C. Jeffrey Wang

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 Express Connection String dkaufmann VB Databases Basics 4 November 3rd, 2006 01:48 PM
Sql Server 2000 Connection String ricpue BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 July 5th, 2006 05:26 PM
sql server 2000 connection string nikotromus Access VBA 6 February 13th, 2005 10:01 PM
SQL Server Connection String Nicky2k Classic ASP Basics 4 January 13th, 2005 05:22 AM
connection string for sql server rj1406 ASP.NET 1.0 and 1.1 Basics 6 September 16th, 2004 02:49 PM

All times are GMT -4. The time now is 05:40 AM.

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