Insert return message (Help)

  • Thread starter Thread starter Russ Wittmann
  • Start date Start date
R

Russ Wittmann

I'm working on a small sql project to insert some job numbers, what I need
to do is tell the user in a message box that the insert was either
successful or unsuccessful, I am curious the best way to do this? would I
need to use some if then statements? I would appreciate any help on this.
Right no the code works but I cant figure out how to do a message retuning
successful.


Thank You....

[MY CODE]

'open sql connection...
SqlConn.Open()

'sql insert command(stored proc) & parameters...
SqlInsertCommand1.Parameters("@JobNumber").Value = txtJobNumber.Text

'sql execute command....
SqlInsertCommand1.ExecuteNonQuery()

'close sql connection...
SqlConn.Close()
 
* "Russ Wittmann said:
I'm working on a small sql project to insert some job numbers, what I need
to do is tell the user in a message box that the insert was either
successful or unsuccessful, I am curious the best way to do this? would I
need to use some if then statements? I would appreciate any help on this.
Right no the code works but I cant figure out how to do a message retuning
successful.


Thank You....

[MY CODE]

'open sql connection...
SqlConn.Open()

'sql insert command(stored proc) & parameters...
SqlInsertCommand1.Parameters("@JobNumber").Value = txtJobNumber.Text

'sql execute command....
SqlInsertCommand1.ExecuteNonQuery()

'close sql connection...
SqlConn.Close()

ADO.NET group:

<
Web interface:

<http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.adonet>
 
Back
Top