Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

ADO Recordset when Querying Sharepoint List internal field [Modified By] is returning ID field (number) and I need Name

$
0
0

I'm trying to create a log file of changes being done by people on a sharepoint list using the [Modified By] column. My connection and SQL script run fine but the [Modified By] column is returning number not name of the person.   I've run into this issue years ago but can't remember how to change SQL statement to index off default value of table (i.e.\ [Modified By].xxxxxx.name).   Any help would be greatly appreciated, Wags.

Simple Code being used:

AccIPLTable = "AZFSM_Inspection_Priority_List"

Set recs = CreateObject("ADODB.Recordset")

Set iplDB = CreateObject("ADODB.Connection")

  iplDB.Open _
    "Provider = Microsoft.ACE.OLEDB.12.0; WSS;IMEX=0;RetrieveIds=Yes;Password=;User ID=; " & _          
    "DATABASE=https://xxxxxxxxxxxxxx/; LIST={xxxxxxxxxxxxxx}; "

  command1 = "Select Reticle_ID, Created, Modified, [Created By], [Modified By]" & _
             "  FROM " & AccIPLTable

recs.open command1, iplDB, dbOpenDynaset

  FD1 = recs.Fields.Item(0)
  FD2 = recs.Fields.Item(1)
  FD3 = recs.Fields.Item(2)
  FD4 = recs.Fields.Item(3)
  FD5 = recs.Fields.Item(4)
  Console FD1 & ", " & FD2 & ", " & FD3 & ", " & FD4 & ", " & FD5
 
recs.close 

set recs = Nothing 
set iplDB = Nothing 



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>