Wrox Programmer Forums
|
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 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 April 22nd, 2005, 05:39 AM
Registered User
 
Join Date: Apr 2005
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


 
Old May 17th, 2005, 07:31 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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



 
Old August 3rd, 2005, 12:26 PM
Authorized User
 
Join Date: Mar 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old October 20th, 2005, 12:35 AM
Friend of Wrox
 
Join Date: Oct 2005
Posts: 124
Thanks: 0
Thanked 1 Time in 1 Post
Default

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





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





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