Adding Password to my connection String

Discussion in 'C#' started by danjapro, Jan 26, 2009.

  1. #1
    Here is my connection string:

    I would liek to Add Password Protection into that string, how do I do it:

    application("cn_str") = "provider=microsoft.jet.oledb.4.0;data source=" & server.MapPath("datablagd2008/La8689gau426rd.mdb") & ""


    Is this correct or wrong?

    application("cn_str") = "provider=microsoft.jet.oledb.4.0;data source=" & server.MapPath("datablagd2008/La8689gau426rd.mdb") & Jet OLEDB:Database Password=laguard ""
     
    danjapro, Jan 26, 2009 IP
  2. andyj00

    andyj00 Active Member

    Messages:
    532
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Well have you tried it?
    If it works then its right ;):)
     
    andyj00, Jan 26, 2009 IP