Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tableadapter.Fill error with Date Parameter

Status
Not open for further replies.

ACCESSDUMMY

Programmer
Oct 22, 2003
33
US
I'm trying to pass a date parameter into the Fill method of a tableadapter and I'm getting an error message stating "cannot convert from 'string' to 'System.DateTime?'.

Here's my code...

using MIS_Database.Schemas.Rpt3YrsDataSetTableAdapters;
using System.Data;
namespace MIS_Database.Schemas {
partial class Rpt3YrsDataSet
{
partial class sp3YrsReportDataTable
{
}

public void FillAll(string paramDate)
{
using (sp3YrsReportTableAdapter ThreeYrsReportadapt = new sp3YrsReportTableAdapter())
{
ThreeYrsReportadapt.ClearBeforeFill = true;
ThreeYrsReportadapt.Fill(this.sp3YrsReport, paramDate);
}
}
}



The build fails on the Fill line when it gets to the paramDate part. Does anyone have any suggestions on how to pass a date parameter?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top