How you define option explicit in Vbscript?
If you want to use Option Explicit in VBScript you should have to declare all variables using the Dim, Private, Public, or ReDim statements.
Using Option Explicit to avoid incorrect typing the name of an existing variable or to avoid confusion in code where the scope of the variable is undefined.
Can you pass optional arguments to function in Vbscript?
Yes, We can pass optional argument to VBScript functions.We can use optional argument in VBScript by specifying optional keyword.
What is hta extension?
.hta extension is used whenever you want to include a VB script in HTML. Here HTML acts as an interface and VB Script as the programming language. .hta extension files do run in the safe and trusted zone of Internet explorer. Although they run in the trusted zone querying is restricted as it has to pass the guidelines of internet explorer.
How is variable declared in VbScript?
Using Dim Statement
Example
Dim Value
What is Variant data type in VbScript?
How you define parametarization in VbScript?
Parametrization is useful when we want to change object's parameters in accordance with a mathematical rule, or data from a file.
We can say that Parametrization is the best way to protect your database from SQL injection attacks
Public statement variables are available to all procedures in all scripts.
Variables declared with Dim at the script level are available to all procedures within the script. At the procedure level, variables are available only within the procedure.
What are varient?
VbScript deals with a single datatype called variant. Datatype means the kind of the data a variable will store.It can be a character data,string data,number data , byte data and a Boolean data. But you don?t have to worry in Vb Script as it only has a datatype of variant to store any type of data.
Explain about SCRRUN.DLL?
Scripting Runtime library is very important for the functioning of Visual basic script because it gives much more functionality such as File management, text operations and file modification features. Scrrun.dll is used very much in programming VB.
A simple example detailing the running of VB Script is by utilizing Windows Script host environment. Visual basic is a stand alone application which has a .vbs as extension. Input can be provided through graphical user interface and output can be obtained by Wscript.exe from dialog and input boxes. From command line it can be invoked by Cscript.exe.
What is event handling in Vbscript?
The actions that are performed by clicking, pressing keys, moving mouse, dragging and dropping etc are called as events. Event handling is the way to capture these events and perform the actions accordingly.
No comments:
Post a Comment