Torna al Thread
[CODE]
Public Function EstraiDati(ByVal strSQL As String, ByVal ObjConn As OdbcConnection) As Integer
'+++ verifica apertura della connessione , verifica semplicemente che la connessione sia aperta altrimenti la riapre+++
Call VerificaConnessione(ConnettiCatalogo, DBCatalogo)
Call VerificaConnessione(ConnettiGenerale, DBGenerali)
Try
Dim objCommand As New Odbc.OdbcCommand(CStr(strSQL), ObjConn)
Dati = objCommand.ExecuteReader
While Dati.Read
EstraiTotRec = Dati(0)
End While
objCommand.Dispose()
Catch ex As Exception
EstraiTotRec = 0
Dim gen As New ClassGenerali
DataReaderError = True
DataReaderErrMsg = "Errore in fase di estrazione Totale Record; " & vbCrLf & vbCrLf & ex.Message
If ViewMsgDebug = True Then gen.MostraMessaggio(HttpContext.Current.Handler, Resources.ResourceMsg.Errore, DataReaderErrMsg)
'SEND MAIL CON ERRORE ESTESO
Call gen.ScriviLog("ClassConnessione.EstraiTotRec", ex.Message)
'gen.SendMailProblemi(DataReaderErrMsg & "<br><br>Query passata: " & strSQL)
gen = Nothing
End Try
End Function
[/CODE]