Visual Basic Interview Questions

Visual Basic Interview Questions and Answers

Visual Basic is a tool that allows you to develop Windows (Graphic User Interface – GUI) applications. The applications have a familiar appearance to the user. Visual Basic is event-driven, meaning code remains idle until called upon to respond to some event (button pressing, menu selection). Visual Basic is governed by an event processor. Nothing happens until an event is detected. Once an event is detected, the code corresponding to that event (event procedure) is executed. Below is the list of latest and updated Visual Basic Interview Questions for beginners as well as experienced users.

Best Visual Basic Interview Questions and Answers

Visual Basic was an autonomous language. This has changed. Now, Visual Basic is part of a larger entity known as the .NET Framework. The .NET Framework encompasses all the .NET technology, including Visual Studio .NET (the suite of development tools) and the common language runtime (CLR), which is the set of files that make up the core of all .NET applications. We herewith compiled some of the Visual Basic Interview Questions will help to understand the Ruby beginners before attend the interview.

Name four different cursor types in ADO and describe them briefly.

The cursor types are listed from least to most resource intensive. Forward Only Fastest, can only move forward in recordset Static Can move to any record in the recordset. Data is static and never

changes. Keyset Changes are detectable, records that are deleted by other users are unavailable, and records created by other users are not detectedDynamic? All changes are visible.

Name the four different locking type in ADO and describe them briefly.

  • LockPessimistic Locks the row once after any edits occur.
  • LockOptimistic Locks the row only when Update is called.
  • LockBatchOptimistic Allows Batch Updates.
  • LockReadOnly Read only. Cannot alter the data.

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.

What are the ADO objects?

Provide a scenario using three of them to return data from a database. Expected answer: Connection Connects to a data source; contains the Errors collection Command Executes commands to the data source. Is the only object that can accept parameters for a stored procedure. Recordset The set of datareturned from the database. Scenario: There are many possibilities.

What are some benefits of using MTS?

Database Pooling, Transactional operations, Deployment, Security, Remote Execution.

What is the benefit of wrapping database calls into MTS transactions?

If database calls are made within the context of a transaction, aborting the transaction will undo and changes that occur within that transaction. This removes the possibility of stranded, or partial data.

Describe and In Process vs. Out of Process component. Which is faster?

An in-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component. Each client app that uses the component starts a new instance of it. An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space.

What is Centralization Error Handling?

Writing function and calling it when error occurs.

What is frx?

When some controls like grid and third party control placed in our application then it will create frx in run time.

What is the Dll required for running the VB?

Vbrun300.dll

Why we use Treeview Control?

To list the hierarchical list of the node objects. Such of files and Directories.

Handling Error in Calling chain.

This will call the top most error where the error is handled.

In project properties if we set Unattended what is it mean?

This cannot have user interface. This can be used for the COM creation.

What is the size of the variant data type?

The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of Decimal, or a character storage size of 22 bytes (plus string length),and can store any character text.

What is view Port?

The area under which the container provides the view of the ActiveX Document is known as a view port.

What are the different types of error?

Syntax Errors, Runtime, Logic.

What is the diff between the Std and Class Module?

Std Global with in the project. Cls Global throughout the all project only thing is we want to set the type lib. Class Modules can be Instantiated.

What is Mixed Cursors?

Static + Keyset

Drag and Drop state numbers and functions?

State 0 Source control is being dragged with the range of a target.

  • Out of the range of a target.
  • One position in the target to another.

What are the Style Properties of Combo Box?

Simple, Dropdown list We can type and select. Dropdown Combo Only Drop Down.

What are the Style properties of List Box?

Simple Single Select, Extended. Multiple Select.


What is Collection Objects?

Similarly, to arrays but is preferred over an array because of the following reasons.

  1. A collection objects uses less Memory than an array.
  2. It provides methods to add and delete members.
  3. It does not require reason statement when objects are added or deleted.
  4. It does not have boundary limitations.

What is the difference between Property Get, Set and Let?

  • Set Value is assigned to ActiveX Object from the form.
  • Let Value is retried to ActiveX Object from the form.
  • Get- Assigns the value of an expression to a variable or property.

How to change the Mouse Pointer?

Screen.MousePointer = VBHourGlass/VBNormal.

What is Friend Variable?

Scope sharable between projects.

What is DBFailError?

Rolls Back updates if any errors Occurs.

What are the record set types?

  • RdOpenFowardOnly 0 (Default used only for the read only purpose)
  • RdOpenStatic 1
  • RdOpenDynamic 2
  • RdOpenKeySet 3 (Normally used for the live project)

What is the diff between RDO and ADO?

RDO is Hierarchy model whereas ADO is Object model. ADO can access data from both flat files as well as the data bases. I.e., It is encapsulation of DAO, RDO, OLE that is why we call it as OLE-DB Technology.

Diff types of Lock Types?

  • RdConcurReadOnly 0 (Default)
  • RdConcurLock 1 (Pessimistic Locking
  • RdConcurRowver 2 (Optimistic Lociking)
  • RdConcurValues 3
  • RdConcurBatch 4

What are the scopes of the class?

Public, private, Friend

Have you created Properties and Methods for your own Controls?

  • Properties Public variable of a Class
  • Method Public procedure of a class

Private Dim x as integer. Valid?

Private cannot be used in front of DIM.

What is Zorder Method?

Object.Zorder = 1 or 0 Place a Specified mdiform form or control at the front or back of the z-order with n its Graphical Level.

Can us able to set Instancing properties like Singleuse, GlobalSingleuse to ActiveXDll?

No.

What are properties available in Clip Board?

No Properties Available. Only the methods they are SetText, GetText, Setdata(), Getformat(), Clear.

What is the different between Microsoft ODBC Driver and Oracle OBDC Driver?

Microsoft ODBC driver will support all the methods and properties of Visual Basic. Where as the Oracle not.

What the RDO Methods and Events?

  • Methods Events
  • Begin Trans Validate
  • Commit Trans Reposition
  • Rollback Trans Error
  • Cancel Query Complied
  • Refresh
  • Update Controls
  • Update row

What is MAPI?

Messaging Application programming Interface.

What is MDI form?

MDI Styles

Diff type of Datatypes?

  • LOB (Large Object Data type).
  • CLOB (Stores Character Objects).
  • BLOB ( Store Binary Objects such as Graphic, Video Chips and Sound files).
  • BFILE(Store file pointers to LOB It may Contain filename for photo’s store on CD_ROM).

What is Tabstrip control?

Libraries of procedure external to the application but can be called from the application.

What is Static Variable?

Its Scope will be available throughout the life time.

What is DBSqlPassThrough?

It will By Passing the Jet Query Processor.

What is the starting Index value? How to locate it?

It is tab control to place our controls with in the form in multiple sheets.

Index starts with 1.

And to identify If Tabstrip1.SelectedItem.

Index = 1 Then .End if

What is Parser Bug?

It is difficult to use database objects declared in a module from within a form.

What is keyword used to compare to objects?

ISOperator Returns Boolean.

Suppose from form1 to form2 object property settings will arise to?

Invalid procedure calls or argument (Run time error 5)

What is the return type of Instr and Strcmp?

Instr integer (Numeric position)
Strcmp - integer (if both the string are equal they result = 0)
Strcmp (Str1, Str2, Comparetype)
Comparing mode = 0 Binary Comparing
1 Textual Comparing

What is Implicit?

Instance of specific copy of a class with its own settings for the properties defined in that class.

Note: The implicitly defined variable is never equal to nothing.

What is Inprocess and Out of Process?

Inprocess It will run with in the memory. (Local Machine). Out of Process It will run out of the memory Normally in the server side.

Where will we give the option explicit keyword and for what?

In the general declarations section. To trap undeclared variables.

How can we call Stored procedure of Back End in RDO and ADO?

  • In RDO We can call using RDO Query Objects.
  • In ADO We can call using Command Objects.

What is control array and how many we can have it with in the form?

Group of control share the same name. Max 32, 767.

What is diff between the Generic Variable and Specific Variable?

  • Generic Variable:
  • Create Object Ex:-Ole-Automation . No need refers the object library.
  • Specific Variable:
  • Binding Procedure Early and Late Binding (Can be Remove from the Memory).

What is the diff. Between function and sub procedures?

Function will return value but a sub procedure won’t return values

What is the max size allowed for Extension in Visual Basic?

Frm, bas, cls, res, vbx, ocx, frx, vbp, exe

What is FireHouse Cursors?

Forward Only Some time Updateable

How to increase the Date corresponding with month,date,year?

DateSerial(year(Now), Month(Now)+1,1)

Hour, min, sec, month, year, DateSerial, dateadd, datediff, weekday, datevalue, timeserial,timevalue.

Name some date function?

Dateadd(), Datediff(), Datepart(), Cdate()

What is difference between datagrid and flexgrid?

Datagrid Editable. Flexigrid Non-Editable. (Generally used for Read only purpose.)

What are two validate with Data Control?

Data_Validate, Data_Error.

To connect the Data Control with Back end What are all the properties to be set?

Data source Name, Record Source Name

What are the Technologies for Accessing Database from Visual Basic?set?

DAO, Data Control, RDO, ODBCDIRECT, ADO, ODBC API , 0040.

What is Mask Edit and why it is used?

Control. Restricted data input as well as formatted data output.

What is RdExecDirect?

Bypasses the Creation of a stored procedure to execute the query. Does not apply to Oracle.

Different type of Passing Value?

By value, By ref, Optional, Param Array. Note:- Optional keyword cannot be used while declaring arguments for a function using param array.

What are types of binding?

  • Assigning variable with defined memory space.
  • Late Binding – Memory size is allotted in later stage.
  • Ex:- Dim x as object
  • Early Binding – Memory size is allotted while declaring itself. New Key word is important.
  • Ex:- Dim x as New Object

What is Dataware Control?

Any control bound to Data Control.

Visual Studio 2010 is a complete development environment, and it’s called the IDE (short for integrated development environment). The IDE is the design framework in which you build applications; every tool you’ll need to create your Visual Basic projects is accessed from within the Visual Basic IDE. Again, Visual Studio 2010 supports development using many different languages, Visual Basic being the most popular.

We have tried to cover most of the Visual Basic questions which are generally asked in an interview related to the Visual Basic.  You can go through these answers in order to understand the functions and various other technical terms.

So if you have finally found your dream job in Visual Basic coder/or developer but are wondering how to crack the Visual Basic Interview and what could be the probable Visual Basic Interview Questions. Every interview is different and the scope of a job is different too. Hope above assist you to get a dream Job. Keep Learn.