I've checked the API code and it would appear that the DeviceSave method requires Device to be strongly typed (as Device) in order to save.
Unfortunately VBScript creates everything as a variant type which is why you are seeing the type mismatch error.
Is there any particular reason as to why you are having to use VBScript over VB?
If you can provide me a bit of further information as to what you mean by 'maintaining your database', then I may be able to suggest another alternative.
I prefer using VBScript because the development environment required is a copy of Notepad, whereas for VB I need to install Visual Studio or similar. My question would be: why do you prefer VB? However, it's not really a problem - I've now installed VS on the box running Cattools and got my database maintenance program working. And admittedly having the built-in debugger is quite handy. Thanks for getting back to me
No worries Max.
I believe the CatTools API was specifically designed with VB in mind because VB is the language that CatTools application code is written in, and that was the requirement for the customer use-case at the time.
Probably a bit of an oversight that it doesn't fully work on VBScript. From what I can tell, it would require changing the API code to accept variant data types and then perform conversion to the relevant data type within the API function calls.
I can create a Customer Feature Request case for this if you like?