TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
701
1.3k
217.2k
Problem with my save dialog logic
May 24 2018 12:17 PM
Hi,
The code that you see its help to remove (ou delete) one column. Its works fine.
But the problem is I need to put a condition save logic. Its should show a dialog that allow if or not possible to save. Its show this dialog message but when I click yes its display this message error: Additional information: object reference not defined for instance object
private
void
btnDelete_Click(
object
sender, EventArgs e)
{
if
(conn.State != ConnectionState.Open)
conn.Open();
OleDbCommand cmd =
new
OleDbCommand();
comm.Connection = conn;
if
(MessageBox.Show(
"Are you sure to save?"
,
"Save window"
, MessageBoxButtons.YesNo) == DialogResult.Yes)
{
try
{
cmd =
new
OleDbCommand(
"ALTER TABLE Billing DROP COLUMN ID "
, conn);
comm.ExecuteNonQuery();
}
Finally
{
conn.Close();
}
}
}
Reply
Answers (
1
)
The remote server returned an error: (500) Internal Server
Problem implementing Haar Cascade car