Rinaldo

Rinaldo

  • NA
  • 26
  • 0

Getting value of a datatable of a database

Jun 9 2007 6:11 PM
Hi,

I want to see if a value is typed in in a field. My code is:

private void dateSeenDateTimePicker_Validating(object sender, CancelEventArgs e)

{

DataColumn str = carTrackerDataSet.Listing.DateSeenColumn;

string str1 = str.Table.ToString();

string datum = dateSeenDateTimePicker.Value.ToString();

string huidig = listingBindingSource.Current.ToString();

if (string.IsNullOrEmpty(dateSeenDateTimePicker.Text) )

dateSeenDateTimePicker.Value = DateTime.Today;

}

I can't see if there is a vlue in the database and the textbox is always filled.