C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST
This commit is contained in:
@@ -322,9 +322,9 @@ namespace RODBInterface
|
||||
get { return _PCChildList; }
|
||||
set { _PCChildList = value; }
|
||||
}
|
||||
#endregion
|
||||
#region abstracts // need these for each method that must be defined for each database type
|
||||
public abstract string RODB_GetNextGroupTable();
|
||||
#endregion
|
||||
#region abstracts // need these for each method that must be defined for each database type
|
||||
public abstract string RODB_GetNextGroupTable();
|
||||
public abstract string RODB_GetNextRecId(string table);
|
||||
public abstract bool RODB_GetRootGroups(VlnXmlElement root);
|
||||
public abstract bool RODB_DeleteGroup(XmlNode group, string tbname, string toprecid);
|
||||
@@ -355,9 +355,10 @@ namespace RODBInterface
|
||||
public abstract string RODB_GetDBServerForAbout();
|
||||
public abstract string RODB_HasBeenConverted();
|
||||
public abstract bool RODB_WriteSqlConnectToAccess(string newConectStr);
|
||||
#endregion
|
||||
public abstract string RODB_GetModDateTime(string Recid, string table);
|
||||
#endregion
|
||||
|
||||
public RODB()
|
||||
public RODB()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -2382,9 +2383,9 @@ namespace RODBInterface
|
||||
RecID = DBE.GetString(0);
|
||||
MyRecID = RecID;
|
||||
Info = DBE.GetString(1);
|
||||
// it's defined in the local table if the first character is "<" which starts
|
||||
// the schema definition string.
|
||||
if ("<" == Info.Substring(0, 1))
|
||||
// it's defined in the local table if the first character is "<" which starts
|
||||
// the schema definition string.
|
||||
if ("<" == Info.Substring(0, 1))
|
||||
{
|
||||
name = ParseEleName(Info);
|
||||
if (name != null)
|
||||
@@ -2425,7 +2426,7 @@ namespace RODBInterface
|
||||
return retlist;
|
||||
}
|
||||
|
||||
public override string RODB_GetSchemaPiece(string Recid, string table)
|
||||
public override string RODB_GetSchemaPiece(string Recid, string table)
|
||||
{
|
||||
string strGetSchemaPiece;
|
||||
string Info;
|
||||
@@ -3082,7 +3083,28 @@ namespace RODBInterface
|
||||
return GrpCnt;
|
||||
}
|
||||
|
||||
}
|
||||
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
|
||||
//Get the Modification Date / Time for the RO
|
||||
public override string RODB_GetModDateTime(string Recid, string table)
|
||||
{
|
||||
using (System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection(strDatabaseConnectionCommand))
|
||||
{
|
||||
connection.Open();
|
||||
using (System.Data.OleDb.OleDbCommand command = connection.CreateCommand())
|
||||
{
|
||||
//Unfortunately Access wont let you paramaterize the table name
|
||||
command.CommandText = $"SELECT ModDateTime FROM {Regex.Replace(table, "[^a-zA-Z0-9]", "")} WHERE RecID = @Value";
|
||||
command.Parameters.Add(new System.Data.OleDb.OleDbParameter
|
||||
{
|
||||
OleDbType = System.Data.OleDb.OleDbType.VarChar,
|
||||
ParameterName = "@Value",
|
||||
Value = Recid
|
||||
});
|
||||
return command.ExecuteScalar().ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user