Visual Basic Interview Questions & Answers

Showing 10 of 101 questions

Technical interview questions and answers are important for a Visual Basic Interview because many companies still use VB for maintaining legacy applications, automation tasks, and Windows-based tools. Recruiters expect candidates to understand syntax, variables, loops, functions, event-driven programming, and form design. Visual Basic remains relevant for industries that rely on older but stable systems, so questions from VB often appear in interviews at companies like TCS, Infosys, Wipro, Cognizant, and Accenture. This guide includes frequently asked Visual Basic interview questions with simple, clear explanations that help freshers and job seekers prepare effectively. These questions will strengthen your understanding of VB fundamentals and improve your performance in both technical rounds and project discussions during campus placements.

Showing 10 of 101 questions

1. How do you register a component?

Compiling the component, running REGSVR32 MyDLL.dll

2. Name and explain the different compatibility types when creating a COM component

No Compatibility ? New GUID created, references from other components will not workProject Compatibility ? Default for a new component Binary Compatibility ? GUID does not change, references from other components will work

3. Why is it important to use source control software for source code?

Modification history.Code ownership: Multiple people can not modify the same code at the same time.

4. What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful?

SetComplete and SetAbort.

5. What is the tool used to configure the port range and protocols for DCOM communications?

DCOMCONFIG.EXE

6. What does Option Explicit refer to?

All variables must be declared before use. Their type is not required.

7. What are the different ways to Declare and Instantiate an object in Visual Basic 6?

Dim obj as OBJ.CLASS with eitherSet obj = New OBJ.CLASS orSet obj = CreateObject(OBJ.CLASS?) orSet obj = GetObject( , OBJ.CLASS?)orDim obj as New OBJ.CLASS

8. Name the 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.

9. 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. Can not alter the data.

10. 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.
Questions and Answers for Competitive Exams Various Entrance Test