VBScript works the same as Visual Basic except for some notable exceptions:
1. Types cannot be declared in VBScript with the As keyword.
2. Objects are not created with the new operator, but with CreateObject method.
Set Session = Server.CreateObject ("VeraStream.AppConnTable")
'Create an instance in ASP
Set Session = Wscript.CreateObject ("VeraStream.AppConnTable")
'Create an instance in vbs engine
On Error Goto Label does not work in VBScript, so error handling is done inline by checking the Err object:
Session.ConnectToModel "localhost", "CCSDemo" If Err.Number <> 0 Then 'Perform error handling End If
© 1999-2007 Attachmate Corporation. All rights reserved. Terms of Use.