ExecuteCommand with LINQ

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
phburke
Posts: 3
Joined: Sun 22 Feb 2009 22:57

ExecuteCommand with LINQ

Post by 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

Shalex
Devart Team
Posts: 8072
Joined: Thu 14 Aug 2008 12:44

Post by 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.

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

ExecuteCommand with LINQ

Post by rick.duarte » Tue 17 Mar 2009 19:53

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

Regards,

Henrique

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by 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).

Post Reply