The way I'd do it is *without* any of that sql stuff...
0) Create an object that holds the data:
public class SampleItem
{
public DateTime SampleDate { get; set; }
public decimal DepthFeet { get; set; }
public decimal WaterTemp { get; set; }
public SampleItem()
{
SampleDate = new DateTime(0);
DepthFeet = 0M;
WaterTemp = 0M;
}
public SampleItem(dateTime date, decimal depth, decimal temp)
{
SampleDate = date;
DepthFeet = depth;
WaterTemp = temp;
}
public SampleItem(string data)
{
string[] parts = data.Split(',');
SampleDate = DateTime.Parse(parts[0]);
DepthFeet = decimal.Parse(parts[1]);
WaterTemp = decimal.Parse(parts[2]);
}
}
1) Read the text file one line at a time, and instaniate a new SampleItem with the string
You might also want to take some precautions to ensure that the data is otherwise valid as well (in the constructors).