Précédent   Forum du club des développeurs et IT Pro > Dotnet > Développement Web avec .NET
Développement Web avec .NET Forum d'entraide sur les technologies Web de Microsoft (ASP.NET, MVC, Ajax, Silverlight, Services web, Azure, Sharepoint, etc.).
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 30/10/2012, 18h25   #1
Ahmed_Cherif
Invité régulier
 
Homme
Développeur informatique
Inscription : octobre 2012
Messages : 30
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Développeur informatique
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : octobre 2012
Messages : 30
Points : 5
Points : 5
Par défaut Prob : Datatable Take Skip

Je cherche à retourner les maxRow ligne(s) d'une table (de type Datatable) en commancant par le startRow ligne via wcf
j'ai fait donc :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(...)
SqlDataReader reader = command.ExecuteReader();
 
DataTable t = new DataTable("NomTab");
 
t.Load(reader);
 
countItems = t.Rows.Count;
DataTable tt = new DataTable("NouvNomTab");
tt = t.AsEnumerable().Skip(startRow).Take(maxRow).CopyToDataTable();
reader.Close();
oSQLConn.Close();
 
return tt;
En faisant le Rebuild je n'ai pas eu d'erreurs par contre lorsque j'ai exécuté j'ai eu ce message (Inner Exception):

{"The underlying connection was closed: An unexpected error occurred on a receive."}

(Stack Trace): 


[SocketException (0x2746): Une connexion existante a dû être fermée par l'hôte distant]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +6210712
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +134

[IOException: Unable to read data from the transport connection: Une connexion existante a dû être fermée par l'hôte distant.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +300
System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) +26
System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) +265

[WebException: The underlying connection was closed: An unexpected error occurred on a receive.]
System.Net.HttpWebRequest.GetResponse() +6115603
System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +48

[CommunicationException: An error occurred while receiving the HTTP response to http://localhost:8732/Design_Time_Ad..._WCF/Service1/. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +9439503
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +345
TSO_SiteWeb.ServiceReference1.IService1.ExecReqWcf(Int32& countItems, String server, String bd, String requete, Int32 startRow, Int32 maxRow) +0
TSO_SiteWeb.ServiceReference1.Service1Client.ExecReqWcf(Int32& countItems, String server, String bd, String requete, Int32 startRow, Int32 maxRow) in D:\workspace\ProjetTSO\TSO_SiteWeb\Service References\ServiceReference1\Reference.cs:78
TSO_SiteWeb.WebPages.DBChoicee.gvMapXML_RowCommand(Object sender, ASPxGridViewRowCommandEventArgs e) in D:\workspace\ProjetTSO\TSO_SiteWeb\WebPages\DBChoicee.aspx.cs:156
DevExpress.Web.ASPxGridView.ASPxGridView.RaiseRowCommand(ASPxGridViewRowCommandEventArgs e) +138
DevExpress.Web.ASPxGridView.ASPxGridView.OnBubbleEvent(Object source, EventArgs args) +69
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
DevExpress.Web.ASPxGridView.GridViewBaseRowTemplateContainer.OnBubbleEvent(Object source, EventArgs args) +137
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +125
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
d'avance, merci
Ahmed_Cherif est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 20h43.


 
 
 
 
Partenaires

Hébergement Web