Very Strange behavior

Jun 6, 2012 at 11:23 PM

I want to use your module, but I'm seeing some very strange behavior. I create a table. Add some records and try to select one:

Import-Module SQLite
new-psdrive -psprovider SQLite -name sql -root "Data Source=d:/work/oneplacemail.sqlite"
# Create table
new-item -path sql:/users -value "id INTEGER PRIMARY KEY, uid TEXT, site TEXT, siteurl TEXT, listname TEXT, listurl TEXT, status TEXT"
# Insert record
new-item -path sql:/users -value @{ uid='rbreedlove'; site='My Site Name'; siteurl="http://ecurrent.oa.caiso.com/sa"; listname='list a'; listurl="http://ecurrent.oa.caiso.com/sa/lista" }
new-item -path sql:/users -value @{ uid='rking'; site='Your Site Name'; siteurl="http://ecurrent.oa.caiso.com/sb"; listname='list a'; listurl="http://ecurrent.oa.caiso.com/sa/lista" }
new-item -path sql:/users -value @{ uid='rkmadrigal'; site='Your Site Name'; siteurl="http://ecurrent.oa.caiso.com/sb"; listname='list b'; listurl="http://ecurrent.oa.caiso.com/sa/listb" }
new-item -path sql:/users -value @{ uid='rbreedlove'; site='Your Site Name'; siteurl="http://ecurrent.oa.caiso.com/sb"; listname='list a'; listurl="http://ecurrent.oa.caiso.com/sa/lista" }

$user = ls sql:/users -Filter "uid='rbreedlove' and site='My Site Name'"

The retrieval fails when I use the "site" as the "where clause". Using any other field works.

I also can't get the output to display in "format-table -autosize" statements.

Have any idea what might be going on?

 

 

 

 

Jun 7, 2012 at 9:17 PM

I ran the code from your post - modifying only the sqlite database file path - with no issues on both x86 and x64 shells.

Do you get an error, or does the search just not return any results?