daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Feb 12th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public int NewFunction(int UserID, string fName, string fDescription, string connectionStr)
  2.         {
  3.             OracleConnection connection = new OracleConnection(connectionStr);
  4.             try
  5.             {
  6.                 //PLease Note that User ID and  fDescription are passed into the function as  
  7. //parameters
  8.                 connection.Open();
  9.  
  10.                 OracleCommand command = connection.CreateCommand();
  11.  
  12.                 OracleTransaction transaction = connection.BeginTransaction();
  13.                 command.Transaction = transaction;
  14.                         string LoadedFileName = @WfName;//Fd.FileName;
  15.                //read the xaml content from file
  16.                 command.CommandText = "INSERT INTO XYZ(ID, NAME , F_SCRIPT) VALUES (@UserID, @fDescription, EMPTY_CLOB())";
  17.  
  18.                 command.ExecuteNonQuery();
  19.                 transaction.Commit();
  20.                }
  21.    
  22. command.CommandText = "INSERT INTO XYZ(ID, NAME , F_SCRIPT) VALUES (@UserID, @fDescription, EMPTY_CLOB())";
  23.    
  24. command.CommandText = "INSERT INTO XYZ(ID, NAME , F_SCRIPT) VALUES (:UserID, :fDescription, EMPTY_CLOB())";
  25. command.Parameters.Add("UserId", OracleType.Number).Value = userId;
  26. command.Parameters.Add("fDescription", OracleType.NVarChar).Value = fDescription;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top