Results 1 to 8 of 8

Thread: Connection string

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Switzerland
    Posts
    4

    Connection string

    Hi,

    I'm bulding a connection string to connect to database. My problem is that the password have a questionmark (?) inside.
    (IE : pass?ord)


    In Query Analyser, I simply put pass'?'ord and the connection is ok.

    In ado.net, if I put ";password=pass'?'ord", I get a message that this there is invalide caractères. If I didn't put the quote, I get a message that the connection is invalide.

    Someone have an idea ?

    Stéphane

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    using pass?ord as a password is not very secure..... I'd change it.....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Try

    pass''?''ord

    (That's two single quotes, not a double quote)

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Switzerland
    Posts
    4

    Security

    pass?ord is just a sample

    In reality, the password would be like s2*k8u?ud

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    On second thought, also try

    pass'''?'''ord

    (three single quotes)

    Also, do as techgnome says.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Switzerland
    Posts
    4

    Error

    Doesn't work with 2 or 3 quotes:

    Message :
    "Expected ';' delimiter in connection substring 'Data Source=XXX; Initial Catalog=XX;user id =XX;password='''?'''xx'."

  7. #7
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378
    One alternative could be to limit password characters only to alphnumerics and not to use special characters or punctuation signs...
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  8. #8

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Switzerland
    Posts
    4

    Limitation

    Yes, I know !

    But I'm not the DBA ! I have to work with this password !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width