• VBScript FAQ3

    Posted on May 29, 2013 by in Desktop Engineering, Frequently Asked Interview Q's, Scripting, VB Script

    The following are Frequently Asked Questions on VBScript during an interview for Application Packaging/Scripting Position:
    The question and answers are being collected from Various blogs and Articles. My effort is confined to collecting as much material as possible from various sources and publishing it at once place.

    S No.

    Question

    Answer

    1

    How Do I Implement VBScript? You use VB Script in exactly the same manner as you would JavaScript. Simply place all code between these tags like so:

    <SCRIPT LANGUAGE=”VBScript”>

    </SCRIPT>

    2

    Explain about operator precedence in VB Script? In operator precedence expressions are evaluated and resolved in a predetermined order. The order of evaluation can be modulated if you use parenthesis. Expressions present in parenthesis are evaluated first.

    3

    Explain about VB Script? VB script is a Microsoft programming language and it resembles a lower version of the VB. It is an Active Scripting language. This scripting language is included in windows operating system by default. With the use of msscript.ocx you can install VB Script.

    4

    How do you create a recordset object in VBScript? First of all declare a variable to hold the Recordset object, ex-
    Dim objRs

    Now, Create this varible as a Recordset object, ex-
    Set objRs=Server.CreateObject(ADODB.RECORDSET)

    5

     Explain about the functionality of VB Script?  Active X technology can be used to give much more functionality to VB Script. VB provides sub routines, functions, string manipulation, data/time, error handling, etc. VB can have more functionality added to it by working with languages such as ASP.

    VBScript is an interpreter language, code written in VBScript is executed line by line.

    6

    Explain about .wsf files? .wsf files are modeled in similar to XML. They can be executed with the help of Wscript.exe and it can be done from the command line also. This .wsf file can have multiple visual basic files. Reuse functionality is present with this extension file.

    7

     Explain about Tristate constants?  Tristate constants can be used with functions which allow formatting of numbers. These constants can be used with VB Script without defining them. It can be used anywhere in the code to reflect and represent the values.

    8

    Explain about filter expression?  Filter expression returns an array based on a specific filter search condition and it returns a zero based array. Arguments included in the filter array are Input strings, value, include and compare. If there is no match for the value it returns an empty string.

    9

    How to Assign values to a variable ? Simple you have to declare a variable name and assign any value.

    For ex. Name=john
    Status=False
    Age=30

    Now all the above variables has been assigned values.This is a simple way to declare and assign related values to a variable.

    10

    Explain few date functions in VBScript. Date(),
    Time(),
    Now(),
    Left(),
    Right(),
    Mid()
    Be Sociable, Share!

    Written by

    View all articles by

    Email : [email protected]

    Leave a Reply