Hi all,
I'm having an exception while trying to using transaction.
{"An exception was caught during the execution of an action query: Unknown column 'pulsamkios.SD' in 'where clause'. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."}
this is my innerException StackTrace :
at Devart.Data.MySql.bi.a()
at Devart.Data.MySql.bi.i()
at Devart.Data.MySql.ag.a(ac[]& A_0, Int32& A_1, Boolean A_2)
at Devart.Data.MySql.ag.a(Byte[] A_0, Int32 A_1, Boolean A_2, String A_3)
at Devart.Data.MySql.i.e()
at Devart.Data.MySql.i.m()
at Devart.Data.MySql.MySqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Devart.Common.DbCommandBase.ExecuteNonQuery()
at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\ActionQuery.cs:line 231
This happened after i change my database structure and do refresh relational model data from a database.
From this Exception Message :
{"An exception was caught during the execution of an action query: Unknown column 'pulsamkios.SD' in 'where clause'. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."}
Made me confuse since pulsamkios table doesn't have SD field. It had it before i structuring the database.
this is my code regarding this Exception :
MasterfakturmkiosEntity objMasterfakturmkiosEntity = new MasterfakturmkiosEntity();
ResellerEntity objResellerEntity = new ResellerEntity(txtKodeReseller.Text);
objMasterfakturmkiosEntity.NomorFakturMkios = GetMaxNomorNota();
objMasterfakturmkiosEntity.Reseller = objResellerEntity;
objMasterfakturmkiosEntity.KodePengguna = "USR001";
objMasterfakturmkiosEntity.Tanggal = DateTime.Now;
for (int i = 0; i < gridPenjualanMkios.Rows.Count; i++)
{
if (gridPenjualanMkios.Cells[i, "JumlahJual"].Value != null)
{
DetailfakturmkiosEntity objDetailfakturmkiosEntity = new DetailfakturmkiosEntity();
objDetailfakturmkiosEntity.NomorFakturMkios = objMasterfakturmkiosEntity.NomorFakturMkios;
objDetailfakturmkiosEntity.KodePulsa = gridPenjualanMkios.Cells[i, "Kode Pulsa"].Text;
objDetailfakturmkiosEntity.JumlahJual = Convert.ToInt32(gridPenjualanMkios.Cells[i, "JumlahJual"].Value);
objDetailfakturmkiosEntity.HargaBeli = Convert.ToInt32(gridPenjualanMkios.Cells[i, "Harga Beli"].Value);
objDetailfakturmkiosEntity.Harga = Convert.ToInt32(gridPenjualanMkios.Cells[i, "Harga"].Value);
objMasterfakturmkiosEntity.Detailfakturmkios.Add(objDetailfakturmkiosEntity);
}
}
objMasterfakturmkiosEntity.Save(true);
my code using transaction to save Master & Detai of an invoice. I had use TransactionManager before and the Exception raised was the same.
Also, where is the location of
c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\ActionQuery.cs:line 231
How to solve this?
Please let me know if you guys need additional info regarding this Exception.