SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a situation where I can retrieve results using this query

Select * From myList (myList being Sharepoint list)

but cannot get results from this

select First From myList Where First=JoeBob

No insert query works either.

$connString = 'Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes;DATABASE=https://sharepoint/;LIST={897BJ54-AAAA-4989-BH56-8JFJS758BN};'
$spConn = new-object System.Data.OleDb.OleDbConnection($connString)
write-host $spConn.State
$qry='SELECT * FROM myList'
$cmd = new-object System.Data.OleDb.OleDbCommand($qry,$spConn)
$da = new-object System.Data.OleDb.OleDbDataAdapter($cmd)
$dt = new-object System.Data.dataTable

Why is this?

share|improve this question

migrated from Nov 15 '11 at 0:18

This question came from our site for professional and enthusiast programmers.

I've done some Powershell scripting with OleDB and SharePoint and blog about it here:

It looks like you are missing single quotes around JoeBob:

"select First From myList Where ='JoeBob'"

As noted in my blog post inserts statements are not supported.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.