I recently updated a client to Server version 9.2. I'm running the following script with the 8.0 toolkit and 9.2 server:
set app = CreateObject("LFSO80.Application")
'Name of the server where the Laserfiche Server lives
Const LF_SERV = "127.0.0.1"
'LF_SERV = InputBox("Laserfiche Server IP:")
'Name of the Laserfiche repository that will be used for import
Const LF_REP = "Main"
'LF_REP = InputBox("Laserfiche Repository:")
'Name of the Laserfiche User that will be used for importing
Const LF_USER = "mvi support"
'LF_USER = InputBox("Laserfiche User Name:")
'The respective Laserfiche User's password
Const LF_PASS = "xxxxxxxxx"
'LF_PASS = InputBox("Laserfiche User Password:")
set serv = app.GetServerByName(LF_SERV)
set db = serv.GetDatabaseByName(LF_REP)
set conn = CreateObject("LFSO80.Connection")
'set result = ""
conn.UserName = LF_USER
conn.Password = LF_PASS
conn.create db
set allGroups = db.GetAllGroups()
For i = 1 To allGroups.Count
set group = allGroups.Item(i)
result = result & " "
result = result & group.Name
Next
MsgBox(result)
conn.Terminate
I'm getting the error "Error running SQL Command" when running the script.
I'm Getting the following error in Windows event logs:
Database statement execution error encountered. Session ID: 614; Dialog ID: 9940; Repository: 'Main'; CLI routine: SysLinkedAcctOpenListing; Message: [Microsoft][SQL Native Client][SQL Server]Ambiguous column name 'sid'.; SQL Statement: 'select trustee_name, u.sid, account_name from (select trustee_id as id, sid from trusted_group union select userid as id, sid from trusted_login) u left join trustee on id = trustee_id left join account_cache on u.sid = account_sid where left(sid, 2) <> 0x0106 order by trustee_name, account_name'; SQL variable: ''; SQL State: 42000
If I take the sql query that is spelled out in the log and post it in SQL management studio, then run the debugger on it, it gives me the error "ambiguous column name" for the "sid" in the parentheses at on "u.sid = account_sid where left(sid, 2)"
I'm stumped.