(Interview) Visual Basic Interview Questions (Page-3)

Interview : Visual Basic Interview Questions

Page - 3

Describe Database Connection pooling relative to MTS ?

This allows MTS to reuse database connections. Database connections are put to ?sleep? as opposed to being created and destroyed and are activated upon request.

Object pooling is an important design concept required for high-performance applications. A performance optimization based on using collections of preallocated resources, such as objects or database connections. Pooling results in more efficient resource allocation.

Difference between a function and a subroutine ?

A function accepts any number of parameters (possibly zero), does something with them, and returns a value. A subroutine is performs an action, but doesn't return a value.

There are two differences between a function and a subroutine: A)How they are invoked. B)How they are accessed.

A function call has the following syntax ::
function(arg1, arg2, ...)
where: function Is the name of the function. arg1, arg2, ... Are the arguments.

A subroutine call has the following syntax
::subroutine (arg1, arg2, ... {outputfield|'format'})
where: subroutine -->Is the name of the subroutine. arg1, arg2, ... Are the arguments. {outputfield|'format'} Is the name of the output field or its format.

In addition, on some platforms, the functions are available immediately; whereas, the subroutines are available in a special subroutine library that you must access.
Difference between Linked Object and Embedded Object?

Embedding objects -
When you embed an object, a copy of the object is inserted into the destination document. There's no link to the original file. When you change information in the source document, no changes will be reflected in the destination document. The actual data for the object is stored within the destination file. To make changes to the embedded object, double click it and it will launch the original application the source file was in.

Linking objects -
Information is updated when you modify the original source file when you use a linked object. This dynamic updating is very handy for things such as the aforementioned monthly report. You can open up the Excel spreadsheet that is referenced within your Word document.Make changes to the spreadsheet, close Excel, and when you open your Word document... viola! The changes are already there. If that object is linked to ten other Word files, the changes are already in those ten files, too! actually linking or embedding an object is fast and easy.

Difference between listbox and combo box?

A LISTBOX CONTROL displays a list of items from which the user can select one or more. If the number of items exceeds the number that can be displayed, a scroll bar is automatically added to the ListBox control. A COMBOX CONTROL combines the features of a text box and a list box. This control allows the user to select an item either by typing text into the combo box, or by selecting it from the list.
DIFF::Generally, a combo box is appropriate when there is a list of suggested choices, and a list box is appropriate when you want to limit input to what is on the list. A combo box contains an edit field, so choices not on the list can be typed in this field.

Difference between Dynaset and Snapshot?

All Recordset objects are constructed using records (rows) and fields (columns). There are five types of Recordset objects:

Table-type Recordset ::
representation in code of a base table that you can use to add, change, or delete records from a single database table (Microsoft Jet workspaces only).

Dynaset-type Recordset ::
the result of a query that can have updatable records. A dynaset-type Recordset object is a dynamic set of records that you can use to add, change, or delete records from an underlying database table or tables. A dynaset-type Recordset object can contain fields from one or more tables in a database. This type corresponds to an ODBC keyset cursor.

Snapshot-type Recordset ::
a static copy of a set of records that you can use to find data or generate reports. A snapshot-type Recordset object can contain fields from one or more tables in a database but can't be updated. This type corresponds to an ODBC static cursor.

Forward-only-type Recordset::
identical to a snapshot except that no cursor is provided. You can only scroll forward through records. This improves performance in situations where you only need to make a single pass through a result set. This type corresponds to an ODBC forward-only cursor.

Dynamic-type Recordset ::
a query result set from one or more base tables in which you can add, change, or delete records from a row-returning query. Further, records other users add, delete, or edit in the base tables also appear in your Recordset. This type corresponds to an ODBC dynamic cursor (ODBCDirect workspaces only).
Difference Listindex and Tab index?

LIST INDEX::
Returns or sets theindex of the currently selected item in the control. Not available at design time.Default LIST INDEX IS -1 for ComboBox, DirListBox, and DriveListBox controls
TAB INDEX::
Returns or sets thetab order of most objects within their parent form. Visual Basic automatically renumbers the TabIndex of other controls to reflect insertions and deletions. You can make changes atdesign time using theProperties window or atrun time in code.The TabIndex property isn't affected by the ZOrder method.

Previous | Next