A: 

I'd suspect that FindServerConnection_NoMsg is not managing to open the connection, and since it ends in NoMsg that you're not seeing the error about why the connection wasn't opened. You then go on to just use the connection without knowing that the open failed.

Post the code for FindServerConnection_NoMsg.

BTW, your question itself should have given you a clue. It specifically says that the connection can't be used, and that it may not be open. That should have told you where to start looking, and at the least told you you should have posted the code that opened the connection as part of your question.

Ken White
i added the code please go through it. thanks for your help.
pbrp
Remove the line ON ERROR RESUME NEXT from FindServerConnection_NoMsg and run your code. The error message should tell you what the problem is, and why it's happening. ON ERROR RESUME NEXT basically means "ignore any errors and don't tell me about them", which is exactly what's causing you to not know what's happening.
Ken White
i commented that line still i am getting same error message.
pbrp
I don't have VB6 available anywhere, so you'll have to see if someone else spots something. In the meantime, you know the problem is that the connection can't be opened (or is closed somewhere it shouldn't be); try stepping through the code in the debugger starting in FindServerConnection_NoMsg and see where exactly it's failing. That should give you an idea of where to look next.
Ken White
+1  A: 

You have already closed the connection here in TryConnection_NoMsg function (?)

 With objConn
        .CommandTimeout = 30
        .ConnectionTimeout = 30
        .ConnectionString = "Provider=SQLOLEDB.1; Server=" & SvName & "; Database=NORS; User ID=RS_Auth; Password=weLcomers_auth; Initial Catalog=NORS" ' Test
        .Open
        .Close
Shoban
but i opened connection again in InstantiateCommand_SP() method
pbrp
But have you called the function? I cant see :)
Shoban
A: 

Thanks for everyone. I sloved my problem. This what i cahnge in my code

Dim lngRecCount As Long lngRecCount = 0 rcdDNE.MoveFirst

 With cmdCommand
    .ActiveConnection = objConn
    .CommandText = "insert into t_DATA_DneFrc (RTN, AccountNbr, FirstName, MiddleName, LastName, Amount) values ('" & rcdDNE("RTN") & "', '" & rcdDNE("AccountNbr") & "', '" & rcdDNE("FirstName") & "', '" & rcdDNE("MiddleName") & "', '" & rcdDNE("LastName") & "', '" & rcdDNE("Amount") & "')"
    .CommandType = adCmdText

End With

Set rcddnefrc = New ADODB.Recordset
With rcddnefrc
    .ActiveConnection = objConn
    .Source = "SELECT * FROM T_DATA_DNEFRC"
    .CursorType = adOpenDynamic
    .CursorLocation = adUseClient
    .LockType = adLockOptimistic
    .Open
End With

Do Until rcdDNE.EOF
    lngRecCount = lngRecCount + 1
    frmDNELoad.lblStatus.Caption = "Adding record " & lngRecCount & " of " & rcdDNE.RecordCount & " to database."
    frmDNELoad.Refresh
    DoEvents
    Call CommitNew
    rcdDNE.MoveNext
Loop

frmDNELoad.lblStatus.Caption = "DNE Processing Complete."
frmDNELoad.Refresh
pbrp