Ticket Q362284
Visible to All Users

Command 'DevExpress.Xpo.Helpers.CommandChannelHelper.ExecuteQuerySQL' is not supported by DevExpress.Xpo.DB.MSSqlConnectionProvider.??

created 13 years ago

I'm use the provider the data via WCF Service.
At the Server, I'm Use the DataStoreService and run in windows services. database server is MSSQL2008.
at the Client, I'm use the DataStoreClient:
                DataStoreClient c = new DataStoreClient(ntBinding, new EndpointAddress("net.tcp://127.0.0.1:8991/MindSoft.CoreService/4D23558A37D64000B11BC8D30564937D/DataStoreContractService"));
                XpoDefault.DataLayer = new SimpleDataLayer©;
                Session s = new Session();
When I use the s.ExecuteQuery("Select * From Customer") methon. throw a Exception
"Command 'DevExpress.Xpo.Helpers.CommandChannelHelper.ExecuteQuerySQL' is not supported by DevExpress.Xpo.DB.MSSqlConnectionProvider"
Why have the Exception…
And I have any way to excute sql query via DataStoreService and DataStoreClient?

Show previous comments (7)

    thank you for your reply.
    I not pass a provider instance in constructor arguments
    Because I'll connect different database for each different baseaddress.
    for example:
    the baseaddress:net.tcp://serverIP:port/MindSoft/DB1/DataStoreContractService will connection the database "DB1"
    the baseaddress:net.tcp://serverIP:port/MindSoft/DB2/DataStoreContractService will connection the database "DB2"
    Then the provider is not fixed at run time.
    I will get the AccountID pass OperationContext.Current.Host.BaseAddresses[0] methon at the dataservice constructor and create different provider for the client connect different database.
    I don't know if there is a better way is recommended??

    DevExpress Support Team 13 years ago

      Hi Qu,
      Thank you for the clarification. We couldn't find an immediate solution for this scenario. Please bear with us. We will inform you as soon as an answer is found.
      Thanks,
      Michael.

      DevExpress Support Team 13 years ago

        Hi Qu,
        I recommend that you implement this functionality as follows. Create a custom connection provider (IDataStore) with a dictionary of nested providers for every database you want to connect, and implement IDataStore and ICommandChannel methods to delegate operations to an appropriate nested provider, selected from the dictionary.
        Thanks,
        Michael.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.