Windows script Host error

can you please help to solve the issue of windows script.
error is below.
Scrip c\user\A H A\M001\loadMovieDetailsDataset.js
line: 1
char: 1
error: ‘db’ is undefined
code: 800A1391
source: Microsoft Jscript runtime error

@Ali_98340 You need to load that from within MongoShell, don’t try to execute it directly from the windows shell. Check the lab and/or the mongo shell help.


thank you now its been uploaded:blush:

1 Like

@Ali_98340 Glad its working! Another way to look at it is that the MongoShell is also a javascript interpreter, and the file you loaded is a set of Javascript statements. You could technically type in those from the file, but the “load” command saves you the trouble of that!

HI Mike I tride within the mongo shell, maybe I am missing something else

I have responded to you on other thread
Please paste the screen shot
If you ran it at mongo prompt it should work
cd to the dir where file resides
connect to mongo
then run load command