ExecuteCommand with LINQ

ExecuteCommand with LINQ

Postby phburke » Sun 22 Feb 2009 23:03

Hello,

When i use the code below

Code: Select all
public void SetStatus(CDRStatus toStatus, CDRStatus fromStatus, int numberOfRecords)
{
    object[] parameters = { (short)toStatus, (short)fromStatus, numberOfRecords };
    AsteriskIngressContext.ExecuteCommand("UPDATE cdr SET processed = {0} WHERE processed = {1} LIMIT {2}", parameters);
}

I get the following exception.

Code: Select all
System.NotSupportedException was unhandled
  Message="Specified method is not supported."
  Source="Devart.Data.Linq"
  StackTrace:
       at Devart.Data.Linq.Provider.Query.bb.a(MethodCallExpression A_0)
       at Devart.Data.Linq.Provider.Query.bb.i(Expression A_0)
       at Devart.Data.Linq.Provider.Query.bb.h(Expression A_0)
       at Devart.Data.Linq.Provider.DataProvider.a(Expression A_0)
       at Devart.Data.Linq.Provider.DataProvider.h(Expression A_0)
       at Devart.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)
       at Devart.Data.Linq.DataContext.ExecuteCommand(String command, Object[] parameters)


Any suggestion as to what I am doing wrong?

Thanks,
Pat
phburke
 
Posts: 3
Joined: Sun 22 Feb 2009 22:57

Postby Shalex » Mon 23 Feb 2009 15:23

LINQ to SQL ExecuteQuery support is not implemented yet. And we cannot provide you with the exact timeframe when it is made. As a workaround, we recommend you to use the MySqlCommand object and execute the SQL query. UPDATE SQL influences the row state only in the database.

For more information about our LINQ to SQL roadmap, please refer to http://www.devart.com/dotconnect/linq.html , the Roadmap section.
Shalex
Devart Team
 
Posts: 7616
Joined: Thu 14 Aug 2008 12:44

ExecuteCommand with LINQ

Postby rick.duarte » Tue 17 Mar 2009 19:53

It's not clear in roadmap about ExecuteCommand.
When will be available?

Regards,

Henrique
rick.duarte
 
Posts: 35
Joined: Fri 23 Jan 2009 23:07
Location: Rio de Janeiro, Brazil

Postby AndreyR » Wed 18 Mar 2009 09:35

We plan to add ExecuteCommand and ExecuteQuery functionality in one of the nearest builds (approximate timeframe is the beginning of April).
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for MySQL