- Upload a couple of items through the UI and set the values.
- Open up SQL and run a query to find the detail:
select nvarchar10,nvarchar11,ntext2,* from alluserdata WHERE tp_LeafName = ‘Test File.txt’ order by tp_version desc
- The columns you want to see with the values you can fine in the SPList.SchemaXml…file the Field element with the field it stores the data in
- From here, I realized the multiple value fields are completely surrounded and split with ;#. For example, if you have values A,B, then it would be ;#A;#B;#.
That is all, upload these files with the SPFolder.Files.Add() method and create yourself a HashTable with the metadata and you are off and running…of course this is real easy through PowerShell:
$site = new-object microsoft.sharepoint.spsite(http://server)
$web = $site.rootweb
#$list = $web.Lists["ListName"]
$folder = $web.getfolder("/ListName")
#Plain Text Field
#Field with Choice and Checkboxes…
$bytes=[byte]get-content export.csv -encoding byte
$file = $folder.files.add("Test File.txt",$bytes,$x,$true)