Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 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"
    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?
  #2 (permalink)  
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

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.

  #3 (permalink)  
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

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


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
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

All times are GMT -4. The time now is 01:46 PM.

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