- January 3, 2008
- 890
- 556
- Home Country
- Germany
- Moderator
- #1
I do ask for help on how to do native sql queries from a TVE35 plugin.
With the old TV server in MP1 I could do a native SQL query like
StringBuilder SqlSelectCommand = new StringBuilder();
SqlSelectCommand.Append("select * from Recording ");
SqlSelectCommand.AppendFormat(string.Format("where {0}", Expression));
SqlStatement stmt = new SqlBuilder(StatementType.Select, typeof(Recording)).GetStatement(true);
SqlStatement ManualJoinSQL = new SqlStatement(StatementType.Select, stmt.Command, SqlSelectCommand.ToString(), typeof(Recording));
myRecordingList = ObjectFactory.GetCollection<Recording>(ManualJoinSQL.Execute());
Log.Debug("SQL Result:myRecordingList.Count" + myRecordingList.Count.ToString());
For the old server there was a definition of SqlStatement, Objectfactory and SqlBuilder in Gentle.Framework, which i could not find for the new TvE35.
As this is my biggest roadblock on the path to write my first plugin for TVE35 I would appreciate any help here.
Another issue is the deletion of a setting, but I guess if I could do a general SQL query i could do the deletion from there.
With the old TV server in MP1 I could do a native SQL query like
StringBuilder SqlSelectCommand = new StringBuilder();
SqlSelectCommand.Append("select * from Recording ");
SqlSelectCommand.AppendFormat(string.Format("where {0}", Expression));
SqlStatement stmt = new SqlBuilder(StatementType.Select, typeof(Recording)).GetStatement(true);
SqlStatement ManualJoinSQL = new SqlStatement(StatementType.Select, stmt.Command, SqlSelectCommand.ToString(), typeof(Recording));
myRecordingList = ObjectFactory.GetCollection<Recording>(ManualJoinSQL.Execute());
Log.Debug("SQL Result:myRecordingList.Count" + myRecordingList.Count.ToString());
For the old server there was a definition of SqlStatement, Objectfactory and SqlBuilder in Gentle.Framework, which i could not find for the new TvE35.
As this is my biggest roadblock on the path to write my first plugin for TVE35 I would appreciate any help here.
Another issue is the deletion of a setting, but I guess if I could do a general SQL query i could do the deletion from there.