Upgraded from version 6.0.58.0 to version 6.50.250.0 - ISSUE

Upgraded from version 6.0.58.0 to version 6.50.250.0 - ISSUE

Postby bconstantin » Mon 05 Dec 2011 22:37

I've just upgraded from version 6.0.58.0 to version 6.50.250.0 and most of the application works except for one functionality where now I'm getting this error:"ORA-01008: not all variables bound", see below the code. I have the older version on another machine and the same code is working on that computer. I've debuged both applications and both are having the same generated SQL. I'm using oracle 10g express database. Is there any setting that I have to do ?

CONNECTION STRING:



CODE:
if (DataContext.Connection.State != System.Data.ConnectionState.Open)
DataContext.Connection.Open();

Devart.Data.Oracle.OracleConnection conn = (Devart.Data.Oracle.OracleConnection)((System.Data.EntityClient.EntityConnection)DataContext.Connection).StoreConnection;
LP_PERSON_MP oldPERSON = LoadPERSON(oldDATA_ID, false, false);
decimal PERSONTYPE_ID = GetCurrentPERSONTYPE(oldPERSON).PERSONTYPE_ID;
trans = conn.BeginTransaction();

NewDATA_ID = SQLSequanceManager.GetNextID(typeof(LP_PERSON_MP), conn, trans);
string TMP_FOLDER_NM = string.Format(System.Configuration.ConfigurationManager.AppSettings["TMPPERSONTYPEFOLDERName"], NewDATA_ID);

Devart.Data.Oracle.OracleCommand cmd = new Devart.Data.Oracle.OracleCommand("", conn, trans);

StringBuilder sbCols = new StringBuilder(1000), sbParams = new StringBuilder(100);
Dictionary st = GetCurrentStaticDataDictionaryValues();

foreach (string cname in st.Keys)
sbCols.AppendFormat(cname + ",");

int ParamIndex = 10;
foreach (string cname in st.Keys)
{
sbParams.AppendFormat(" :v{0},", ParamIndex);
cmd.Parameters.Add(string.Format("v{0}", ParamIndex), Devart.Data.Oracle.OracleDbType.Number).Value = st[cname];
ParamIndex++;
}

cmd.Parameters.Add("v1", Devart.Data.Oracle.OracleDbType.Number).Value = NewDATA_ID;
cmd.Parameters.Add("v2", Devart.Data.Oracle.OracleDbType.Number).Value = oldDATA_ID;
cmd.Parameters.Add("v3", Devart.Data.Oracle.OracleDbType.VarChar).Value = NewPERSONName;
cmd.Parameters.Add("v4", Devart.Data.Oracle.OracleDbType.VarChar).Value = authInfo.UserName;
cmd.Parameters.Add("v5", Devart.Data.Oracle.OracleDbType.TimeStamp).Value = DateTime.Now;
cmd.Parameters.Add("v6", Devart.Data.Oracle.OracleDbType.VarChar).Value = TMP_FOLDER_NM;
cmd.Parameters.Add("v7", Devart.Data.Oracle.OracleDbType.Number).Value = (decimal)ePERSONStatus.InProgress;
cmd.Parameters.Add("v8", Devart.Data.Oracle.OracleDbType.Number).Value = PERSONTYPE_ID;

cmd.CommandText = string.Format(@"INSERT INTO MDT.LP_PERSON_MP ( DATA_ID, DG_COLLEAGUE_ID, DG_COMPANY_ID, PERSON_NM, DG_LINE_OF_COVERAGE_ID, ST_STATUS_TYPE_ID, FUTURE_EFFECTIVE_DT, FUTURE_EXPIRATION_DT,
ST_EFF_DATES_CONSISTENT_ID, ST_HIST_DATES_INPUT_TYPE_ID, NO_OF_YEARS_AVAILABLE, NO_OF_YEARS_USED, ST_DRIVERLICENSE_TYPE_ID, RETENTION_AM, DRIVERLICENSE_LIMIT_AM, VALID_DATE_DT, VALID_MONTHS,
ST_VALU_DT_CONSISTENT_ID, INFO_TREND_ASSUMPTION_AM, ST_ALAE_TYPE_ID, ST_HOBBY_TREND_TYPE_ID, ST_HOBBY_ALLOC_TYPE_ID, HOBBY_ALLOC_TYPE_OTHER_TX, ST_HASRENEWAL_YN_ID,
ST_NO_RENEWAL_REASON_ID, ST_GROUNDUPINFO_YN_ID, PROJECTED_HOBBY_AM, COMMENT_TX, REPORT_DT,
{0}
OPTIMISTIC_LOCKING, PERSONTYPE_ID, TMP_FOLDER_NM, TMP_FOLDER_STATUS, AUDIT_INSERT_USER_NAME_TX, AUDIT_INSERT_DT, AUDIT_UPDATE_USER_NAME_TX, AUDIT_UPDATE_DT
)
SELECT :v1, DG_COLLEAGUE_ID, DG_COMPANY_ID, :v3, DG_LINE_OF_COVERAGE_ID, :v7, FUTURE_EFFECTIVE_DT, FUTURE_EXPIRATION_DT, ST_EFF_DATES_CONSISTENT_ID, ST_HIST_DATES_INPUT_TYPE_ID,
NO_OF_YEARS_AVAILABLE, NO_OF_YEARS_USED, ST_DRIVERLICENSE_TYPE_ID, RETENTION_AM, DRIVERLICENSE_LIMIT_AM, VALID_DATE_DT, VALID_MONTHS, ST_VALU_DT_CONSISTENT_ID, INFO_TREND_ASSUMPTION_AM, ST_ALAE_TYPE_ID,
ST_HOBBY_TREND_TYPE_ID, ST_HOBBY_ALLOC_TYPE_ID, HOBBY_ALLOC_TYPE_OTHER_TX, ST_HASRENEWAL_YN_ID, ST_NO_RENEWAL_REASON_ID, ST_GROUNDUPINFO_YN_ID, PROJECTED_HOBBY_AM, COMMENT_TX, REPORT_DT,
{1}
0, :v8, :v6, '.................', :v4, :v5, :v4, :v5
FROM MDT.LP_PERSON_MP
WHERE DATA_ID = :v2 ",
sbCols.ToString(),
sbParams.ToString()
);

cmd.ExecuteNonQuery();
bconstantin
 
Posts: 8
Joined: Wed 27 Apr 2011 23:47

Re: Upgraded from version 6.0.58.0 to version 6.50.250.0 - ISSUE

Postby bconstantin » Mon 05 Dec 2011 22:46

bconstantin wrote:I've just upgraded from version 6.0.58.0 to version
Last edited by bconstantin on Tue 06 Dec 2011 00:33, edited 1 time in total.
bconstantin
 
Posts: 8
Joined: Wed 27 Apr 2011 23:47

found the issue there is a rather serious problem I think

Postby bconstantin » Tue 06 Dec 2011 00:22

cmd.CommandText = " SELECT :v1 , :v3, :v2 FROM TABLE WHERE ID = 1 "; <<-- THIS SELECT WORKS

cmd.CommandText = " SELECT :v1, :v3, :v1, :v3, :v2 FROM TABLE WHERE ID = 1"; <<-THIS SELECT DOES NOT WORK
bconstantin
 
Posts: 8
Joined: Wed 27 Apr 2011 23:47

Postby Shalex » Thu 08 Dec 2011 16:18

Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle