C# Select Query Example

Version 1
    This document was generated from CDN thread

    Created by: Brian McCormick on 09-07-2010 11:03:57 AM
    I would like to run a simple query on the CM database to find devices associated to specific application users.
    I have downlaoded the AxlSqlToolkit and checked out the java. Does anyone have a c# version of this written they would like to share?

    Subject: RE: C# Select Query Example
    Replied by: Chris Bertrand on 19-07-2010 08:36:27 AM
    Hi Brian,
    There's a file with the database structure in the documents section. That will help you out with any other queries. As for this one it should look some thing like

    ExecuteSQLQueryReq sqlreq = new ExecuteSQLQueryReq
    sqlreq.sql = "select n.dnorpattern dn, rp.name partition, d.name, d.description from ((((device d inner join devicenumplanmap m on d.pkid = m.fkdevice) inner join numplan n on n.pkid = m.fknumplan) inner join NumPlan p on m.fknumplan = p.pkid) inner join routePartition rp on p.fkRoutePartition = rp.pkid) where d.name like 'SEP%' and numplanindex = 1 order by n.dnorpattern";

    ExecuteSQLQueryRes sqlres = axlService.executeSQLQuery(sqlreq);