I updated my code to use what you'd suggested but the SQL captured by the profiling tool still references CMS_Class
exec sp_executesql N'SELECT [ClassXmlSchema], [ClassTableName]
FROM CMS_Class
WHERE [ClassName] = @ClassName',N'@ClassName nvarchar(9)',@ClassName=N'CMS.Class'
The following code works perfectly but I'd like to understand how I could successfully do this with DataQuery.
GeneralConnection cn = ConnectionHelper.GetConnectionByName("ExternalCMSConnectionString");
QueryDataParameters parameters = new QueryDataParameters();
parameters.Add("@LastName", "Smith");
QueryParameters qParams = new QueryParameters("SELECT CustomerID FROM CUSTOMER WHERE LAST_NAME = @LastName", parameters, QueryTypeEnum.SQLQuery);
DataSet ds = cn.ExecuteQuery(qParams);