P
Pete Davis
I have a web-based C# app. I've got a routine to delete a record from a
database. It executes just fine. No exceptions, no errors that I can find,
but it simply doesn't do anything.
It's not a file permissions issue. I can add new records just fine. I can
delete the records from within Access, no problem.
I'm using ODBC (don't ask, it's a limitation of the environment I'm
deploying to). The code is as follows:
string query = "DELETE FROM Comment WHERE CommentID=" +
commentID.ToString();
using (OdbcConnection conn = new OdbcConnection(_connectionString))
{
using(OdbcCommand cmd = new OdbcCommand(query, conn))
{
conn.Open();
cmd.ExecuteNonQuery();
}
}
Am I missing something? Surely I'm just missing something basic. Everything
else in the app works okay. I can read records and add new records just
fine. I haven't tried updates because they're not needed. Any help would be
greatly appreciated. Thanks.
Pete
database. It executes just fine. No exceptions, no errors that I can find,
but it simply doesn't do anything.
It's not a file permissions issue. I can add new records just fine. I can
delete the records from within Access, no problem.
I'm using ODBC (don't ask, it's a limitation of the environment I'm
deploying to). The code is as follows:
string query = "DELETE FROM Comment WHERE CommentID=" +
commentID.ToString();
using (OdbcConnection conn = new OdbcConnection(_connectionString))
{
using(OdbcCommand cmd = new OdbcCommand(query, conn))
{
conn.Open();
cmd.ExecuteNonQuery();
}
}
Am I missing something? Surely I'm just missing something basic. Everything
else in the app works okay. I can read records and add new records just
fine. I haven't tried updates because they're not needed. Any help would be
greatly appreciated. Thanks.
Pete