1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ADO Connection String.

Discussion in 'Programming' started by ForexSurfr, Aug 21, 2009.

  1. ForexSurfr

    ForexSurfr New Member

    Joined:
    Aug 21, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I am currently having problems with my ADO connection string. I have searched all over the internet for a solution to this problem but I have yet to find a solution. Can someone help me with the proper configuration for a SQL OLEDB connection with a windows authentication? I have attached my C++ code file and a printscreen of my SQL Server Express signon screen.
     

    Attached Files:

  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Instead of attaching your problem try posting them as that becomes easier for us to look at
     
  3. ForexSurfr

    ForexSurfr New Member

    Joined:
    Aug 21, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    The following is an error message I am receiving:

    Error number: 80040e4d Login failed for user 'mcertini'.
    Error
    Code = 80040e4d
    Code meaning = I
    Source = Microsoft OLE DB Provider for SQL Server
     
  4. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    Try using below sample code :

     
  5. ForexSurfr

    ForexSurfr New Member

    Joined:
    Aug 21, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    naimish,

    Thank you for your reply. Listed below is the message I get when I eliminate all of the arguments other than the "Provider" and "Data Source" and modify these to your recommendation.

    Error number: 80004005 Unrecognized database format 'C:\SQL Server 2000 Sample
    Databases\NORTHWND.MDF'.
    Error
    Code = 80004005
    Code meaning = U
    Source = Microsoft JET Database Engine

    Listed below is the message I get when I retain all of the original arguments and modify the arguments you specified:

    Error number: 80040e21 Multiple-step OLE DB operation generated errors. Check e
    ach OLE DB status value, if available. No work was done.
    Error
    Code = 80040e21
    Code meaning = I
    Source = Microsoft OLE DB Service Components
     
  6. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    Try not using quotes, i.e.
    Code:
    pConnection1->ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;...(etc)";
    
     
  7. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    This error only comes when there is some dependency.

    The solution I was using it, try to convert your database in 97 format, it ll get closed.

    ;)
     
  8. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    770
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:

Share This Page