dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: Can I hide password information in an ADO Connection object?

  1. #1
    Filipo Novo Mór Guest

    Can I hide password information in an ADO Connection object?



    Hi, pals!

    I'm working in a app where I need to share an ADO Connection object between
    many client VB apps at the same time. But I can't show (for this client apps)
    any password information. Is there some way to hide the ConnectionString
    property? Or some better way to do that?

    Thanks for ANY help! :-)

    Filipo



  2. #2
    Chuck Yocum Guest

    Re: Can I hide password information in an ADO Connection object?



    I'm working in a app where I need to share an ADO Connection object between
    many client VB apps at the same time. But I can't show (for this client apps)any
    password information. Is there some way to hide the ConnectionString property?
    Or some better way to do that?



    I am not totally sure what you mean. How are you sharing a ConnectionString
    between different Apps. Do you mean different Forms or APPs?


  3. #3
    Paul Clement Guest

    Re: Can I hide password information in an ADO Connection object?

    On 30 Jan 2001 03:28:27 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br> wrote:

    ¤
    ¤
    ¤ Hi, pals!
    ¤
    ¤ I'm working in a app where I need to share an ADO Connection object between
    ¤ many client VB apps at the same time. But I can't show (for this client apps)
    ¤ any password information. Is there some way to hide the ConnectionString
    ¤ property? Or some better way to do that?

    Unless you want a major performance problem you should never pool a single connection object. The
    implementation doesn't scale and trying to funnel multiple users through a single connection object
    may work, but very poorly.


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  4. #4
    Filipo Novo Mór Guest

    Re: Can I hide password information in an ADO Connection object?




    Hi, friends!

    What I need is share an ADO Connection Object from a server (responsible
    for user validation and db connection) and a client app (that will use this
    connection object to query the database), disallowing to the client app the
    access to the user and password information. Then, I can't simply pass the
    Connection Object to the client app ('cause the user and password would be
    visible from the Conneciton object properties). How can I allow to the client
    app use the Connection object without show the user and password information?
    The server app will be an ActiveX DLL and a client app a standart EXE,
    referencing the first one.

    Thanks!


    "Chuck Yocum" <Chuck_Yocum@Hotmail.com> wrote:
    >
    >
    >I'm working in a app where I need to share an ADO Connection object between
    >many client VB apps at the same time. But I can't show (for this client

    apps)any
    >password information. Is there some way to hide the ConnectionString property?
    >Or some better way to do that?
    >
    >
    >
    >I am not totally sure what you mean. How are you sharing a ConnectionString
    >between different Apps. Do you mean different Forms or APPs?
    >



  5. #5
    Filipo Novo Mór Guest

    Re: Can I hide password information in an ADO Connection object?



    Friends,

    The reason to share the Connection Object with the client app is disallow
    the access to the user and password information (from client app). Most times,
    I'll have not more than 2 or 3 client apps at the same time (I'm not worried
    - yet - with the performance). The Connection object will be visible thru
    as a server property.

    Thanks!


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
    >On 30 Jan 2001 03:28:27 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br>

    wrote:
    >


    >¤ Hi, pals!

    >¤ I'm working in a app where I need to share an ADO Connection object

    between
    >¤ many client VB apps at the same time. But I can't show (for this client

    apps)
    >¤ any password information. Is there some way to hide the ConnectionString
    >¤ property? Or some better way to do that?
    >
    >Unless you want a major performance problem you should never pool a single

    connection
    >object. The
    >implementation doesn't scale and trying to funnel multiple users through

    a single connection
    >object
    >may work, but very poorly.
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



  6. #6
    Paul Clement Guest

    Re: Can I hide password information in an ADO Connection object?

    On 30 Jan 2001 08:12:30 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br> wrote:

    ¤
    ¤
    ¤ Friends,
    ¤
    ¤ The reason to share the Connection Object with the client app is disallow
    ¤ the access to the user and password information (from client app). Most times,
    ¤ I'll have not more than 2 or 3 client apps at the same time (I'm not worried
    ¤ - yet - with the performance). The Connection object will be visible thru
    ¤ as a server property.
    ¤
    ¤ Thanks!

    So the ActiveX DLL is running inside of a process such as Microsoft Transaction Server/Com+?

    An ActiveX DLL requires a host process under which to run. If your client application is not on the
    server you will need a server process to launch the (in-process) ActiveX DLL. It cannot run
    standalone like an ActiveX EXE (out of process server).


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  7. #7
    ProgrammerCarrie Guest

    Re: Can I hide password information in an ADO Connection object?


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
    >On 30 Jan 2001 03:28:27 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br>

    wrote:
    >


    >¤ Hi, pals!

    >¤ I'm working in a app where I need to share an ADO Connection object

    between
    >¤ many client VB apps at the same time. But I can't show (for this client

    apps)
    >¤ any password information. Is there some way to hide the ConnectionString
    >¤ property? Or some better way to do that?
    >
    >Unless you want a major performance problem you should never pool a single

    connection
    >object. The
    >implementation doesn't scale and trying to funnel multiple users through

    a single connection
    >object
    >may work, but very poorly.
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



  8. #8
    ProgrammerCarrie Guest

    Re: Can I hide password information in an ADO Connection object?


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
    >On 30 Jan 2001 03:28:27 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br>

    wrote:
    >


    >¤ Hi, pals!

    >¤ I'm working in a app where I need to share an ADO Connection object

    between
    >¤ many client VB apps at the same time. But I can't show (for this client

    apps)
    >¤ any password information. Is there some way to hide the ConnectionString
    >¤ property? Or some better way to do that?
    >
    >Unless you want a major performance problem you should never pool a single

    connection
    >object. The
    >implementation doesn't scale and trying to funnel multiple users through

    a single connection
    >object
    >may work, but very poorly.
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)


    Paul - Have you had experience with single connection strings to SQL? How
    do you know that it will be a performance issue? My DBA said that this connection
    is the best type for the server. In addition I have read this in various
    form including the SQL 7.0 wrox book.


  9. #9
    Filipo Novo Mór Guest

    Re: Can I hide password information in an ADO Connection object?




    Hi, pals!

    I think that I didn't explain properly about my problem.
    The point is: I need to hide the user and password information to the client
    app. Here doesn't matter the server implementation (if an In-Process or Out-Of-Process
    server); The client app will access the database reading a server property
    called 'Connection'. For example:

    Dim ServerAPP As New clServerAPP
    Dim rsData As New ADODB.RecordSet

    ' Open the database connection without show the user and password information
    to the client app
    If Not ServerApp.OpenConnection() Then
    ' Error handling here
    Exit Sub
    End If

    rsData.Open "Select * from table", ServerApp.Connection

    What I want to avoid here are the following lines:

    Debug.Print ServerApp.Connection.ConnectionString

    or

    Debug.Print ServerApp.Connection.Properties("Password").Value

    Donno how can I do that; Can I hide this properties of the ADO Connection
    Object? Can I create a new Connection object without this properties (for
    example, using inheritance?? ) But how??

    ANY help will be very appreciated! :-)

    Thaks a lot! Filipo



    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
    >On 30 Jan 2001 08:12:30 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br>

    wrote:
    >


    >¤ Friends,

    >¤ The reason to share the Connection Object with the client app is disallow
    >¤ the access to the user and password information (from client app). Most

    times,
    >¤ I'll have not more than 2 or 3 client apps at the same time (I'm not worried
    >¤ - yet - with the performance). The Connection object will be visible thru
    >¤ as a server property.

    >¤ Thanks!
    >
    >So the ActiveX DLL is running inside of a process such as Microsoft Transaction

    Server/Com+?
    >
    >
    >An ActiveX DLL requires a host process under which to run. If your client

    application
    >is not on the
    >server you will need a server process to launch the (in-process) ActiveX

    DLL. It cannot
    >run
    >standalone like an ActiveX EXE (out of process server).
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



  10. #10
    Paul Clement Guest

    Re: Can I hide password information in an ADO Connection object?

    On 31 Jan 2001 04:14:45 -0800, "Filipo Novo Mór" <ttyman@zipmail.com.br> wrote:

    ¤
    ¤
    ¤
    ¤ Hi, pals!
    ¤
    ¤ I think that I didn't explain properly about my problem.
    ¤ The point is: I need to hide the user and password information to the client
    ¤ app. Here doesn't matter the server implementation (if an In-Process or Out-Of-Process
    ¤ server); The client app will access the database reading a server property
    ¤ called 'Connection'. For example:
    ¤
    ¤ Dim ServerAPP As New clServerAPP
    ¤ Dim rsData As New ADODB.RecordSet
    ¤
    ¤ ' Open the database connection without show the user and password information
    ¤ to the client app
    ¤ If Not ServerApp.OpenConnection() Then
    ¤ ' Error handling here
    ¤ Exit Sub
    ¤ End If
    ¤
    ¤ rsData.Open "Select * from table", ServerApp.Connection
    ¤
    ¤ What I want to avoid here are the following lines:
    ¤
    ¤ Debug.Print ServerApp.Connection.ConnectionString
    ¤
    ¤ or
    ¤
    ¤ Debug.Print ServerApp.Connection.Properties("Password").Value
    ¤
    ¤ Donno how can I do that; Can I hide this properties of the ADO Connection
    ¤ Object? Can I create a new Connection object without this properties (for
    ¤ example, using inheritance?? ) But how??
    ¤
    ¤ ANY help will be very appreciated! :-)
    ¤
    ¤ Thaks a lot! Filipo
    ¤

    See if the following helps:

    http://msdn.microsoft.com/library/ps...prg01_0ahx.htm


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  11. #11
    Paul Clement Guest

    Re: Can I hide password information in an ADO Connection object?

    On 30 Jan 2001 21:30:04 -0800, "ProgrammerCarrie" <Carebe6113@aol.com> wrote:


    ¤ Paul - Have you had experience with single connection strings to SQL? How
    ¤ do you know that it will be a performance issue? My DBA said that this connection
    ¤ is the best type for the server. In addition I have read this in various
    ¤ form including the SQL 7.0 wrox book.

    Depending on how you are trying to do this you can't really serialize multiple users via a single
    connection. Not unless you want them to wait. This is the implementation I see based on the initial
    question.

    The preferred method to implement is connection pooling. Starting with MDAC 2.0, OLEDB now supports
    connection pooling automatically (in addition to ODBC). When you use connection pooling, a
    connection is not dropped but released to the "pool" for reuse when closed in your server (database
    component). New connections (up to the number configured for your database server) are created as
    needed, but note that this will only work if you are using the same login credentials, server and
    database, whenever a connection is required.


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center