Stefano Ravagni wrote:
>
> Hello Joe, here my code for CloseDati to help you to reproduce the error 
> that i don't understand...
> 
> ++++++++++++++++++
> Public Sub CloseDati()
> 
>          'chiude i dati del datareader associati all'oggetto DATI cui
>          ' spesso sono attaccati anche altri oggetti come
>          ' l'oggetto ObjCmd
>          Try
>              If IsNothing(Dati) = False Then
>                  If Dati.IsClosed = False Then Dati.Close()
>              End If
>          Catch ex As Exception
>              Call ScriviLog("ModConnessione.CloseDati", ex.Message)
>              MsgBox("ERRORE DURANTE LA CHIUSURA DEI DATI APERTI!" & vbCrLf
& vbCrLf & ex.Message)
>          End Try
>      End Sub
> 
> Just seen the image attachment i sent which demostrate i obtain the error
?
> 

I'm still unable to reproduce the issue.  Is an exception being caught by
this
method while trying to close the data reader?  Also, perhaps instead of
using
the IsNothing function, you might want to change the "If" expression to:

        If Not Dati Is Nothing Then

In theory, changing the "If" expression should not make any difference;
however,
I seem to recall that the IsNothing function was typically used for checking
the
sub-type of a Variant (i.e. and not for checking for null references).  Of
course,
I have not used Visual Basic.NET for quite a long time and I may be wrong.

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to