How to Pass date values from winforms to dataset.xsd TableAdapter?
<p>i'm trying to pass values from winform to dataset.xsd.But it is not working.</p>

<p>code for winform which i'am using is string br;</p>

<pre><code> string br;

    private void btnReport_Click(object sender, EventArgs e)
    {
        using (BrokerJangadReport1 BJR = new BrokerJangadReport1())
        {
            if (BJR.ShowDialog() == DialogResult.OK)
            {
                br = BJR.Broker;
                d1 = BJR.Date1;
                d2 = BJR.Date2;
            }
        }
    }

    private void cmbBrokerName_SelectedIndexChanged(object sender, EventArgs e)
    {
        br = cmbBrokerName.SelectedItem.ToString();
    }
    DateTime d1, d2;
    private void BrokerJangadReport_Load(object sender, EventArgs e)
    {

        d1 = DateTime.Parse(dateTimePickerFrom.Text);
        d2 = DateTime.Parse(dateTimePickerTo.Text);
    }
</code></pre>

<p>And to fill dataset</p>

<pre><code>private void BrokerJangadReport1_Load(object sender, EventArgs e)
{
    // TODO: This line of code loads data into the 'DataSetBrokerJangad.BrokerJangadEntry' table. You can move, or remove it, as needed.
    this.BrokerJangadEntryTableAdapter.Fill(this.DataSetBrokerJangad.BrokerJangadEntry,BrokerName:,df,dt);

    this.reportViewer1.RefreshReport();
}
string BrokerName;
DateTime df, dt;
public string Broker
{
    get { return BrokerName; }
}

public DateTime Date1
{
    get { return df; }
}
public DateTime Date2
{
    get { return dt; }
}
</code></pre>

<p>the problem is in
this.BrokerJangadEntryTableAdapter.Fill(this.DataSetBrokerJangad.BrokerJangadEntry,BrokerName:,df,dt);
 This is not accepting df and dt.</p>

<p>My query in dataset is</p>

<pre><code>SELECT        BrokerName, ReffPartyName, [Date], [Size], Quality, Carat, Rate, Amount
FROM            BrokerJangadEntry
WHERE        (BrokerName = ?) AND ([Date] BETWEEN ? AND ?)
</code></pre>

<p>Can any one correct this code?</p>

<p>Please help me.......</p>
