stijnsanders / TMongoWire

Delphi MongoDB driver
MIT License
102 stars 37 forks source link

Run Javascript #38

Closed scaleman114 closed 7 years ago

scaleman114 commented 7 years ago

Hi I do not seem to be able to get your javascript example to work. Wire.Insert('system.js',BSON(['_id','x1','value',bsonJavaScriptCodePrefix+ 'function(){return {test:123};}'])); d:=Wire.Get('$cmd',BSON(['eval','x1();'])); Memo1.Text:=BsonToJson(IUnknown(d['retval']) as IBSONDocument); The error I am getting is: Could not convert variant of type (Null) into type (Unknown)

scaleman114 commented 7 years ago

Sorry I have sorted it, it was an authorisation issue.

stijnsanders commented 7 years ago

ok, I'm glad it works now