Page 1 of 1

ExecuteCommand with LINQ

Posted: Sun 22 Feb 2009 23:03
by phburke
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

Posted: Mon 23 Feb 2009 15:23
by Shalex
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.

ExecuteCommand with LINQ

Posted: Tue 17 Mar 2009 19:53
by rick.duarte
It's not clear in roadmap about ExecuteCommand.
When will be available?

Regards,

Henrique

Posted: Wed 18 Mar 2009 09:35
by AndreyR
We plan to add ExecuteCommand and ExecuteQuery functionality in one of the nearest builds (approximate timeframe is the beginning of April).