Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
QuestionCompare two strings with different fonts Pin
huonghue3-Feb-10 17:17
huonghue3-Feb-10 17:17 
AnswerRe: Compare two strings with different fonts Pin
huonghue3-Feb-10 19:09
huonghue3-Feb-10 19:09 
AnswerRe: Compare two strings with different fonts Pin
Roger Wright3-Feb-10 19:33
professionalRoger Wright3-Feb-10 19:33 
GeneralRe: Compare two strings with different fonts Pin
huonghue4-Feb-10 13:26
huonghue4-Feb-10 13:26 
AnswerRe: Compare two strings with different fonts Pin
Richard MacCutchan3-Feb-10 22:25
mveRichard MacCutchan3-Feb-10 22:25 
GeneralRe: Compare two strings with different fonts Pin
huonghue4-Feb-10 13:21
huonghue4-Feb-10 13:21 
GeneralRe: Compare two strings with different fonts Pin
Richard MacCutchan4-Feb-10 21:45
mveRichard MacCutchan4-Feb-10 21:45 
QuestionWhat is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 17:03
Zar Ni3-Feb-10 17:03 
I read that if I successfully insert one row of data or delete one row of data, the sql server will return me 1.

But when I try it, it returns me -1 instead of 1 although the row of data is successfully inserted or deleted.

Anyone here could enlighten me if I got something wrong? Thank you very much in advance.

SqlConnection con = new SqlConnection(GUIInitializer.DBconnectionString);
 SqlCommand cmd = new SqlCommand(GUIInitializer.stp_GUI_DELETEITEMAIRLINEMAPPING, con);
 cmd.CommandType = CommandType.StoredProcedure;
 cmd.Parameters.AddWithValue("@ITEM_CODE", itemCode);
 con.Open();
 int rows = cmd.ExecuteNonQuery();
 con.Close();
 if (rows == -1)
 {
     DeleteItemData(itemCode);
 }
 else
     MessageBox.Show("Item Code: " + itemCode + " Deletion FAILED!");

AnswerRe: What is the return value of the insert and delete sql statement Pin
Palash Biswas3-Feb-10 17:21
Palash Biswas3-Feb-10 17:21 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 18:43
Zar Ni3-Feb-10 18:43 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Palash Biswas3-Feb-10 19:54
Palash Biswas3-Feb-10 19:54 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 20:11
Zar Ni3-Feb-10 20:11 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 20:19
Zar Ni3-Feb-10 20:19 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Palash Biswas3-Feb-10 20:27
Palash Biswas3-Feb-10 20:27 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 20:29
Zar Ni3-Feb-10 20:29 
Questiontransparent control and zorder problem Pin
fireghosthk3-Feb-10 16:38
fireghosthk3-Feb-10 16:38 
QuestionAdd months and set the last day of the month in one step Pin
sri_34643-Feb-10 15:22
sri_34643-Feb-10 15:22 
AnswerRe: Add months and set the last day of the month in one step [modified] Pin
Luc Pattyn3-Feb-10 15:39
sitebuilderLuc Pattyn3-Feb-10 15:39 
GeneralRe: Add months and set the last day of the month in one step Pin
sri_34643-Feb-10 16:50
sri_34643-Feb-10 16:50 
GeneralRe: Add months and set the last day of the month in one step Pin
Luc Pattyn3-Feb-10 17:01
sitebuilderLuc Pattyn3-Feb-10 17:01 
AnswerRe: Add months and set the last day of the month in one step Pin
Luc Pattyn3-Feb-10 16:11
sitebuilderLuc Pattyn3-Feb-10 16:11 
Questionrename listbox item Pin
kennyhibs3-Feb-10 12:40
kennyhibs3-Feb-10 12:40 
AnswerRe: rename listbox item Pin
Luc Pattyn3-Feb-10 12:57
sitebuilderLuc Pattyn3-Feb-10 12:57 
GeneralRe: rename listbox item Pin
kennyhibs3-Feb-10 18:21
kennyhibs3-Feb-10 18:21 
GeneralRe: rename listbox item Pin
Luc Pattyn3-Feb-10 23:58
sitebuilderLuc Pattyn3-Feb-10 23:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.