BAQ results Blank Title 134880

Try trimming the text.


From: Adam.Gwizdz@... [vantage] <vantage@yahoogroups.com>;
To: <vantage@yahoogroups.com>;
Subject: [Vantage] BAQ results
Sent: Thu, Feb 12, 2015 4:17:43 PM

Â
<div id="ygrps-yiv-893488853ygrp-text">
  
  
  <p>Could anyone tell me why am I getting rows count zero.<br clear="none"><br clear="none">Below is a code trying to access BAQ with two parameters.<br clear="none"><br clear="none">When I run the query directly I get the results.<br clear="none"><br clear="none">The code below gives me columns count 6 but rows count is 0.<br clear="none"><br clear="none">try<br clear="none">Â Â  Â  Dim dq As New DynamicQuery(oTrans.Session.ConnectionPool)<br clear="none">Â Â Â Â  Dim dqds As Epicor.Mfg.Bo.QueryDesignDataSet = new QueryDesignDataSet()<br clear="none"><br clear="none">Â Â Â Â Â  dqds = dq.GetQueryByID(&quot;MT-TestToDelete&quot;)<br clear="none">Â Â Â Â Â  dqds.querywhereitem(0).rvalue = CStr(txtField4Value.Text)Â Â  Â &#39; LotNum<br clear="none">Â Â Â Â Â Â  dqds.querywhereitem(1).rvalue = CStr(txtField2Value.Text)Â Â  Â &#39; PartNum<br clear="none">Â Â Â Â Â Â  Dim ds As DataSet = dq.Execute(dqds)<br clear="none"><br clear="none">Â Â Â Â Â Â Â 

MsgBox("TotalRows: " & ds.Tables(0).Rows.Count & " TotalColumns: " & ds.Tables(0).Columns.Count)
                Â
catch ex as exception
   messagebox.show (ex.message)
end try

</div>
 


<div style="color:#fff;height:0;"></div></div>
Could anyone tell me why am I getting rows count zero.

Below is a code trying to access BAQ with two parameters.

When I run the query directly I get the results.

The code below gives me columns count 6 but rows count is 0.

try
     Dim dq As New DynamicQuery(oTrans.Session.ConnectionPool)
     Dim dqds As Epicor.Mfg.Bo.QueryDesignDataSet = new QueryDesignDataSet()

      dqds = dq.GetQueryByID("MT-TestToDelete")
      dqds.querywhereitem(0).rvalue = CStr(txtField4Value.Text)    ' LotNum
       dqds.querywhereitem(1).rvalue = CStr(txtField2Value.Text)    ' PartNum
       Dim ds As DataSet = dq.Execute(dqds)

        MsgBox("TotalRows: " & ds.Tables(0).Rows.Count & " TotalColumns: " & ds.Tables(0).Columns.Count)
                      
catch ex as exception
    messagebox.show (ex.message)
end try