当 ExcuteNonQuery 执行时,我得到一个 ORAC 0936。我想我的问题是我的 SQL 的 VALUES 部分。在此先感谢您的帮助
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();
}
///////////////////////////////////////// ///////////////// // * ** * ** * ** * ** * ** * ** * ** * ** * ** * * //好的,谢谢大家的回复。这就是我使用stackckoverflow的其他帖子解决其他问题的方式。请注意 fDescription 和 USerID 被传递给函数。
command.CommandText = "INSERT INTO IMS_Workflow (ID, NAME , F_SCRIPT) VALUES ('" + UserID + "', '" + WfDescription + "', EMPTY_CLOB())";