I created a console application. All it does is update one field in one lookup table. I still get an error but a different one "Failed to load DataItemDescription"
I copied the data folder from c:\program files (x86)\softpro\select to 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\' where I put this console application.
This is the code for my console app.
Imports SoftPro.Select.Client.SelectServer
Imports SoftPro.OrderTracking.Common
Imports SoftPro.OrderTracking.Client
Imports System.Reflection
Imports System.IO
Module Module1
Public table As ILookupTable
'connect using the select server object
Public sps As New SoftPro.Select.Client.SelectServer("
http://spapp:8000") ', credentials)
Public spec As New LookupQuerySpec()
Public lookups As Lookups = sps.GetService(Of Lookups)()
Sub Main()
Dim strSQL As String
Dim item As ILookupValue
Dim row As ILookupRow
On Error Resume Next
Dim str As String = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase.Substring("UpdatesInSelect://\".Length))
sps.EnsureAuthenticated()
spec.Filter = "[LookupCode] like '%%'"
spec.Table = "AbstractorTesting"
spec.SchemaOnly = False
On Error Resume Next
Dim table As ILookupTable = lookups.QueryTable(spec)
For x = 0 To table.Rows.Count - 1
row = table.Rows(x)
row.Item("LookupCode") = row.NewValue(False, "TEST--" & x) 'this worked
Next
lookups.ApplyChanges(table)
End Sub
End Module
The following is the output. I don't get errors on the debug but it doesn't update.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Security.Cache.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Common.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Common.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.BusinessObjects.Base.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Administration.Common.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Security.Classes.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'vdyp3sym'
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.BusinessRules.Base.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Common.Classes.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Security.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 'Lookup Table Fetch Thread' (0x1418) has exited with code 0 (0x0).
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'Anonymously Hosted DynamicMethods Assembly'
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.DebuggerVisualizers\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.DebuggerVisualizers.dll'
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.BusinessObjects.Core.dll'
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.Documents.Common.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'UpdatesInSelect.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\SoftPro\Select\UpdatesInSelect\bin\Debug\SoftPro.DocEngine.Common.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
UpdatesInSelect.vshost.exe Error: 0 : Failed to load DataItemDescription cache: Value cannot be null.
Parameter name: key
A first chance exception of type 'SoftPro.OrderTracking.Common.LookupException' occurred in SoftPro.OrderTracking.Client.dll
The thread 'vshost.RunParkingWindow' (0x11ac) has exited with code 0 (0x0).
The thread '<No Name>' (0x1638) has exited with code 0 (0x0).
The program '[6792] UpdatesInSelect.vshost.exe: Managed (v2.0.50727)' has exited with code 0 (0x0).