VB 6.0 & SQL Server 6.5 
Author Message
 VB 6.0 & SQL Server 6.5

I have a VB application that connects to a SQL Server.  The application
connects to the server when the user logs in.  The connection is kept open
while the user is in the application since several calls to the server are
made.  I noticed that on forms that return more than one recordset a new
session/user is added to the server.  The problem is that when the form is
closed, the session is still active on the server side making it look like
someone is logged on several times.  This does not appear to be a problem on
forms where only one recordset is being returned.

What may be causing this problem?

Thanks



Mon, 02 Sep 2002 03:00:00 GMT  
 VB 6.0 & SQL Server 6.5
are you using ADO code, ADODC, Data Environment?

if you are using ADO code, make sure that you explicitly create a Conneciton
object that all your recordsets use to connect to the database.  When you
are closing the application, close the connection and set it to Nothing.

If you are using Data Environment, make sure you close the Data Enviroment
connections as the application terminates.

If you are using ADODC then you will simply have to live with it.  The price
you pay for databinding.  Don't worry though, eventually SQL Server will
realize the connections aren't active and just kill them.

Kirk Graves
MCSD, MCT


Quote:
> I have a VB application that connects to a SQL Server.  The application
> connects to the server when the user logs in.  The connection is kept open
> while the user is in the application since several calls to the server are
> made.  I noticed that on forms that return more than one recordset a new
> session/user is added to the server.  The problem is that when the form is
> closed, the session is still active on the server side making it look like
> someone is logged on several times.  This does not appear to be a problem
on
> forms where only one recordset is being returned.

> What may be causing this problem?

> Thanks



Mon, 02 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB 6.0 & SQl server 6.5

2. VB & SQL Server 6.5 Contract

3. NEWBIE:VB & SQL Server 6.5 Bound Controls

4. VB 4.0 & SQL Server 6.5 (Identity Column)

5. VB 5.0 & Stored Procedure (SQL Server 6.5)

6. VB3, Intersolv MultiLink VB & SQL Server 6.5

7. VB4 RDO Performance: SQL Server 6.0 vs 6.5

8. SQL Server 6.0 vs 6.5

9. DAO Update Deadlocks SQL Server 6.5, but not 6.0

10. Visual Basic & SQL server 6.5

11. CR 6.0 - SQL 6.5 - DSN Changed - VB 5.0

12. Testing for no returned rows in recordset from SQL 6.5 using VB 6.0

 

 
Powered by phpBB® Forum Software