web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

SQL Timeout Exception

(0) ShareShare
ReportReport
Posted on by

Good day,

I have a question about a behavior in my code.

I have a function method that make a query to DB as following.

ColumnSet ColsConfiguracionActividadNovedad =
new ColumnSet(
new[]
{
ColPedido, ColConfiguracionproducto, ColNombre, ColOwnerid, ColEstadoActividad, ColTipoTarea,
ColResponsable, ColUsuarioResponsable, ColEquipoResponsable, ColCausa, ColNovedad, ColDescripcion
});

QueryExpression queryConfiguracionActNovedad = new QueryExpression();
queryConfiguracionActNovedad.NoLock = true;
queryConfiguracionActNovedad.EntityName = NombreEsquemaEntidad;
queryConfiguracionActNovedad.ColumnSet = ColsConfiguracionActividadNovedad;
queryConfiguracionActNovedad.Criteria = new FilterExpression();
queryConfiguracionActNovedad.Criteria.AddCondition(ColPedido, ConditionOperator.Equal, pedidoid);
queryConfiguracionActNovedad.Criteria.AddCondition(
ColConfiguracionproducto,
ConditionOperator.Equal,
configuracionproductoid);

queryConfiguracionActNovedad.Criteria.AddCondition(
ColCausa,
ConditionOperator.Equal,
causaid);

queryConfiguracionActNovedad.Criteria.AddCondition(
ColEstado,
ConditionOperator.Equal,
0);

EntityCollection resultado = this.service.RetrieveMultiple(queryConfiguracionActNovedad);

At the moment to execute the unit test for this method, it returns a Timeout SQL Exception.

Now, if I add to the ColumnsSet the colum "ColEstado" and reexecute the unit test it's success.

My question: what's the reason for that behavior? what may be happens? is any configuration in the Entity or DB?

thanks a lot!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Prashant_ Profile Picture
    1,040 on at

    Following blog might help you 

    https://community.dynamics.com/crm/b/crmdavidjennaway/posts/sql-timeouts-in-crm-generic-sql-error

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans