public static bool UpdateRecord(string tableName, string updateColumnValues) { string sqlCommand = "update " + tableName + " SET " + updateColumnValues; SQLModule.ExcuteCommand(sqlCommand); return(true); }
public static bool DeleteRecord(string tableName, string primaryKey, string primaryKeyValue) { string sqlCommand = "delete " + tableName + " WHERE " + primaryKey + " = " + primaryKeyValue; SQLModule.ExcuteCommand(sqlCommand); return(true); }
public static string AddRecord(string tableName, string fieldList, string fieldValues) { string sqlCommand = "insert into " + tableName + "(" + fieldList + ") Values (" + fieldValues + "); "; SQLModule.ExcuteCommand(sqlCommand); //get primary key string primaryKey = GetPrimaryKey(tableName); //assuming that we will get a table and a row everytime string newRecSuccess = "{\"Result\":\"OK\"}"; return(newRecSuccess); }