In my original post I didn't add that I close the connection just before
I exit the function.
 
    If lngRecordAffected <> 0 Then ' if the execute was successful then
let's commit the updates
        cn.CommitTrans
        WriteData = lngRecordAffected
    Else ' otherwise let's rollback to before the execute command.
        cn.RollbackTrans
        WriteData = lngRecordAffected
    End If

    If cn Is Nothing Then
    Else
        cn.Close
    End If
    
    Exit Function
 
I do not really understand your question about pooled connections. 
Does the above code answer your question?
 
 
In your VB code, are your connections pooled, or are you using the same

connection for each database call?

Reply via email to