Can anyone tell my why my local .sdf
isn't populating data with the following routine:
internal static void InsertLocalNotify(string _em, string _phone, int _emon, int _phoneon)
{
using (SqlCeConnection _con = new SqlCeConnection(Properties.Settings.Default.DomainsToTestConnectionString))
{
using (SqlCeCommand _cmd = new SqlCeCommand())
{
_cmd.Connection = _con;
_cmd.CommandType = System.Data.CommandType.Text;
_cmd.CommandText = "Insert Into ToNotify (NotifySendEmail, NotifySendText, NotifyEmailAddress, NotifyPhoneNumber, LastUpdated) Values (@NE, @NP, @EM, @PH, @LU)";
_cmd.Connection.Open();
_cmd.Parameters.AddWithValue("@NE", _emon);
_cmd.Parameters.AddWithValue("@NP", _phoneon);
_cmd.Parameters.AddWithValue("@EM", _em);
_cmd.Parameters.AddWithValue("@PH", _phone);
_cmd.Parameters.AddWithValue("@LU", DateTime.Now);
_cmd.Prepare();
_cmd.ExecuteNonQuery();
_cmd.Parameters.Clear();
}
}
}
Table structure is:
NotifySendEmail int
NotifySendText int
NotifyEmailAddress nvarchar(500)
NotifyPhoneNumber nvarchar(500)
LastUpdated datetime
I've verified via stepping through the code, that all data passed in is correct.