Wrox Programmer Forums
| 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 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 October 20th, 2005, 04:08 PM
Registered User
 
Join Date: Aug 2004
Location: White House, TN, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rrlevron
Default Chapter 12...

this just aint working. If anyone can make this work without getting an "login failed for user 'sa'"?

Here is my code thus far:

'Now we use this selection to open the connnection in the appropriate way
    if strDatabaseType = "Access" then
        objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Data Source=c:\datastores\Movie2000.mdb;" & _
            "Persist Security Info=False"
    else
    objConn.Open "Provider=SQLOLEDB;Persist Security Info=False;" & _
        "User Id=sa;pwd=;Initial Catalog=msdb;" & _
        "Initial File Name=C:\Program Files\Microsoft SQL Server\MSSQL\Data\Movie2000.mdf"


    End If


What am I doing wrong?
 
Old December 17th, 2005, 04:06 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to HeNki
Default

You use SQL for database, don't you?
In my opinion, I think your error may occur when you,or say, your program try to connect databae by using 'sa' user, but in fact, your SQL login mode might be set as logining by using WinNT Way.
Maybe you can replace the code "User Id=sa;pwd=;" with these -- "Integrated Login=SSPI" to solve the problem. I think that may work.

 
Old January 16th, 2006, 01:09 AM
Registered User
 
Join Date: Jan 2006
Location: Saint Paul, MN, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having the same problem. I cannot get the Access connection string to work. Anybody with any ideas. I get the error at the OLEDB... point in the string and I do not see anything wrong with it.

Riaz Hussain





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Chapter 12 .MAttButler BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 5 September 10th, 2006 08:31 PM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Chapter 12 Koga VB.NET 2002/2003 Basics 0 November 2nd, 2004 11:43 PM





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