Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
public string DoInsertTravels(string proc,string travelsname)
      {
          try
          {
              mDbconnection = conn.GetDefaultDbConnectionString();
              using (SqlCommand cmd = new SqlCommand(proc, mDbconnection))
              {
                  string Result = string.Empty;
                  cmd.CommandType = CommandType.StoredProcedure;
                  cmd.Parameters.Add("@Travelsname", SqlDbType.NVarChar, 150).Value = travelsname;
                  cmd.Parameters.Add("@Result", SqlDbType.NVarChar, 500).Direction = ParameterDirection.Output;
                  cmd.ExecuteNonQuery();
                  return Result = cmd.Parameters["@Result"].Value.ToString(); ;
              }
          }
          catch { throw; }
          finally
          {
              mDbconnection.Close();
          }
      }
Posted
Comments
[no name] 2-Jul-14 7:40am    
And your question and/or problem is....?
sridharan.N 2-Jul-14 10:37am    
am get the solution

1 solution

You shouldn't do it but it also should not do any harm. A good discussion around it is located here, http://stackoverflow.com/questions/4790771/does-c-sharp-allow-double-semicolon-if-so-are-there-any-special-ways[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900