Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int NewFunction(int UserID, string fName, string fDescription, string connectionStr)
- {
- OracleConnection connection = new OracleConnection(connectionStr);
- try
- {
- //PLease Note that User ID and fDescription are passed into the function as
- //parameters
- connection.Open();
- OracleCommand command = connection.CreateCommand();
- OracleTransaction transaction = connection.BeginTransaction();
- command.Transaction = transaction;
- string LoadedFileName = @WfName;//Fd.FileName;
- //read the xaml content from file
- command.CommandText = "INSERT INTO XYZ(ID, NAME , F_SCRIPT) VALUES (@UserID, @fDescription, EMPTY_CLOB())";
- command.ExecuteNonQuery();
- transaction.Commit();
- }
- command.CommandText = "INSERT INTO XYZ(ID, NAME , F_SCRIPT) VALUES (@UserID, @fDescription, EMPTY_CLOB())";
- command.CommandText = "INSERT INTO XYZ(ID, NAME , F_SCRIPT) VALUES (:UserID, :fDescription, EMPTY_CLOB())";
- command.Parameters.Add("UserId", OracleType.Number).Value = userId;
- command.Parameters.Add("fDescription", OracleType.NVarChar).Value = fDescription;
Add Comment
Please, Sign In to add comment