VB 6 app denied access to DB

Posted on 2009-04-15
Last Modified: 2012-05-06
A VB 6 app is unable to get access to a DB (DAMS) (MSSQL 2005). The connection string appears is correct. Please see code snippet.

An account is set up in SQL 2005 and it is added as a user of DAMS. Well, it is not working. Error messages from both VB 6 and SQL are useless.

I'm not a MS-SQL admin. Regardless, this was "tossed" to me. Any help would be appreciated. If any more info is needed, please ask. Thank you.
cCnString = "Provider=SQLOLEDB;"

    cCnString = cCnString & "User ID=DAMS2_User;"

    cCnString = cCnString & "Password=xxxxxxi;"

    cCnString = cCnString & "data source=sharepoint.database.parks;"

    cCnString = cCnString & "initial catalog=DAMS"

Open in new window

Question by:bobcann
    LVL 142

    Accepted Solution

    >Error messages from both VB 6 and SQL are useless.
    maybe to you, so please post them anyhow

    Author Comment

    VB: Run-time Error 5
    Invalid procedure call or argument.

    Calls and arguments are correct. SQL returns:

    Err.Description = Login failed for user 'DAMS2_User'.

    Hope this helps. If not please ask for any info you need. Thanks.
    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    >Err.Description = Login failed for user 'DAMS2_User'.

    means that DAMS2_User either does not have the password you specified, or that the sql instance is configured for Windows Authentication only (which is the default).

    I presume you did double-check the password, so please check the second item: sql server properties -> security tab -> mixed authentication + restart sql server

    Author Comment

    Thanks angel. I'm finished for the day. Tomorrow I'll check the authentication method and get back to you.

    BTW, the pw was triple checked :)

    Author Comment

    The problem is no longer mine. It went to a person who has as much SQL admin knoeledge as I.

    Sorry to split the points, but the system presented you as two different members.

    Thanks again.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now