Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing dates to VFP tables
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Storing dates to VFP tables
Environment versions
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01067802
Message ID:
01067802
Views:
55
I am trying to set up a default value for a date field. I am using C# along with the Mere Mortals Framework. I tried defining a variable with a type of DateTime but that doesn't work. Here's the code I put in my default class:
public struct IssueDetailDefaults
{
        public int IssueNo;
	public datetime IssueDate;
		
	public IssueDetailDefaults(int issueNo)
        {
		this.IssueNo = issueNo;
		this.IssueDate = DateTime.Now;
        }
}
I also want to be able to return a data set based on date ranges and am having the same trouble there. Here's what I tried:
public DataSet GetIssueDetailsByDateRange(DateTime begDate, DateTime endDate)
{
  return this.GetDataSet("SELECT * FROM IssueDetail WHERE " +
	"IssueDate <= '" + endDate + "' and (EMPTY(RetDate) or " +
	"(RetDate >= '" + begDate + "' and RetDate <= '" + endDate + "'))");
}
What am I doing wrong?

Thanks for your help.

Linda
Linda Harmes
HiBit Technologies, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform