<WebMethod()> _ Public Function GetWebServiceHit(ByVal tnRecord As Integer) As DataSet Dim cData As String Dim loDataProvider As Framework.Data = New Framework.Data cData = Framework.FileFunction.GetIni(Framework.App.cStartupDirectory + "\Main.ini", "System", "Data") CheckLogin() If loDataProvider.SQLExec("SELECT TOP " + tnRecord.ToString + _ " WSH.Numero,WSH.AddDate,WSH.Method,WSH.Lap,Member.Prenom,Member.Nom,WSH.IP FROM WSH " + _ "INNER JOIN " + cData + _ "\Member ON WSH.AddUser=Member.Numero ORDER BY WSH.Numero DESC", App.aConnection(1)) = False Then Throw New System.Exception("GetWebServiceHit: " + Framework.App.cError) End If Return loDataProvider2.oDataSet End FunctionloDataProvider seems to be properly instantiated. However, CheckLogin() makes also use of such instantiation. So, sometimes it work, sometimes it don't. I get all kind of error messages in CheckLogin() in reference to loDataProvider.