none
Used HLK API to loading playlist fail on C# RRS feed

  • Question

  • Hi All:

    I were try to used HLK API to develop tool for auto loading pass/fail HLK test result and export to xls file, and already finish this tool it work normally in Win10 RS1 with RS1 HLK, but when I try to used on RS2 15031 OS with RS2 15031 HLK it will show fail msg.

    Error log:

    System.Data.SqlClient.SqlException fail
      Class=16
      ErrorCode=-2146232060
      HResult=-2146232060
      LineNumber=1
      Message=Invalid column name 'ManuallyAdded'.
      Number=207
      Procedure=""
      Server=SERVER
      Source=.Net SqlClient Data Provider
      State=1
      StackTrace:
           at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
           at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
           at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
           at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
           at System.Data.SqlClient.SqlDataReader.get_MetaData()
           at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
           at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
           at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
           at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
           at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
           at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
           at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
           at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
           at System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
           at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
           at Microsoft.Windows.Kits.Hardware.ObjectModel.DBConnection.DbConnectionTargetFamily.GetAllLogoTestsDatabaseObjects()
           at Microsoft.Windows.Kits.Hardware.ObjectModel.DBConnection.DbConnectionTargetFamily.GetTests()
           at Microsoft.Windows.Kits.Hardware.ObjectModel.Target.GetTests()
           at WHCKRC.MainWindow.saveLog(Object hssworkbook) in C:\Users\Administrator\Desktop\WHQL tool\WHCKRC_test(No System.Windows.Forms)\WHCKRC\MainWindow.xaml.cs:line 515
           at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart(Object obj)
      InnerException: 

    Fail code build:

    foreach (ProductInstance pi in manager.GetProject(projects[n]).GetProductInstances())
    {
        foreach (Target tt in pi.GetTargets())
        {
             i = 0;
             items[n] = new string[tt.GetTests().Count];
             foreach (Test test in tt.GetTests().OrderBy(test => test.Name))
             {
                 items[n][i] = test.Name;
                 i++;
             }
        }
    }
    Wednesday, March 8, 2017 6:54 AM

All replies

  • Hi! I wonder have you figured out what caused this error? I'm still struggling with the same issue. Seems like it's not real to load the playlist using the API call...
    Wednesday, May 2, 2018 8:48 PM