reuse connection object with diff username password?



I have an ado.net based application (using BDP borland data provider actually). Everything is working fine. Up till now the connection string for my single connection object has been hard coded. set in designer. Now its time to implement login functionality using different user names and passwords. For a 'login' I figured, ok i'll close the connection if its open, then just change the ConnectionString. I set the exact same connection string as designer, I just set different username & password values.

The second time I run thru this cycle however I get strange exceptions when trying to close the connection. "No pool found to release connection". Then when I go to use it I get "connection already open".

The big question is, are connection objects meant to be reused in this manner, or must I new a new connection instance if I want to have a different connection string?

thanks
---
Posted via DotNetSlackers.com
.



Relevant Pages

  • Re: Electric drain valve - happy ending
    ... > I think I would have it on an extension cord with connection outside ... > in such a manner that you can observe the operation from a safe ...
    (rec.outdoors.rv-travel)
  • RE: DCpromo issue. Health check on AD and group policy.
    ... new DC to create new inbound connection objects (You can't even via ... RAM / perf on most DC's, KCC was not autogening connection obj's. ... We have 2 DNS servers, Bart is the primary DNS server ...
    (microsoft.public.windows.server.active_directory)
  • RE: DCpromo issue. Health check on AD and group policy.
    ... inbound connection objects. ... KCC was not autogening connection obj's. ... We have 2 DNS servers, Bart is the primary DNS server ...
    (microsoft.public.windows.server.active_directory)
  • Re: VB-ADO-SQL Server : SQL Server performs logins after some queries
    ... It should not open new connection, ... > All recordsets in all procedure refer to this specific DB connection ... > Meanwhile I've found the origin of all my SQL Server errors that I faced: ... > not used to open one or more connection objects for different recordsets ...
    (microsoft.public.vb.database.ado)
  • Re: Replication Question
    ... The COs (connection Objects) are created based on the site and site links configuration. ... Generally you don't need to change anything unless the DCs don't have access to all existing DCs over wan because your network configuration may not permit that. ...
    (microsoft.public.windows.server.active_directory)

Loading