Find Interview Questions for Top Companies
Ques:- How do I call oracle pl/sql stored procedure from vb6?
Asked In :- Techvaria Solutions,
Right Answer:
To call an Oracle PL/SQL stored procedure from VB6, you can use the following steps:

1. Set a reference to the Microsoft ActiveX Data Objects Library in your VB6 project.
2. Use the following code snippet to call the stored procedure:

```vb
Dim conn As ADODB.Connection
Dim cmd As ADODB.Command

Set conn = New ADODB.Connection
Set cmd = New ADODB.Command

conn.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=YourDataSource;User Id=YourUsername;Password=YourPassword;"
conn.Open

With cmd
.ActiveConnection = conn
.CommandType = adCmdStoredProc
.CommandText = "YourStoredProcedureName"

' Add parameters if needed
.Parameters.Append .CreateParameter("param1", adVarChar, adParamInput, 50, "value1")
' Add more parameters as necessary
End With

cmd.Execute

conn.Close
Ques:- Have you ever used classes? If so, how have you used them?
Asked In :-
Right Answer:
Yes, I have used classes in VB.NET to create objects that encapsulate data and behavior. I define properties to store data and methods to perform actions related to that data, allowing for better organization and reusability of code.
Ques:- Difference between a function and a subroutine, Dynaset and Snapshot,early and late binding, image and picture controls,Linked Object and Embedded Object,listbox and combo box,Listindex and Tab index,modal and moduless window, Object and Class,Query unloa
Asked In :-
Right Answer:
1. **Function vs. Subroutine**: A function returns a value, while a subroutine does not.
2. **Dynaset vs. Snapshot**: A dynaset allows for updates and reflects changes in the database, while a snapshot is read-only and does not reflect changes.
3. **Early Binding vs. Late Binding**: Early binding resolves references at compile time, while late binding resolves them at runtime.
4. **Image Control vs. Picture Control**: An image control is specifically for displaying images, while a picture control can display images and other types of graphics.
5. **Linked Object vs. Embedded Object**: A linked object refers to an external file, while an embedded object is stored within the document itself.
6. **ListBox vs. ComboBox**: A listbox allows multiple selections and displays a list, while a combobox combines a dropdown list with an editable text box.
7. **ListIndex vs. TabIndex**: ListIndex refers to
Ques:- Dim x, y as integer. What is x and y data type?
Asked In :-
Right Answer:
In the statement `Dim x, y as integer`, only `y` is declared as an integer. `x` is of type `Variant`.
Ques:- Why we need OLE-Automation?
Asked In :- rcmp,
Right Answer:
OLE Automation is needed to enable communication between different software applications, allowing them to share data and functionality seamlessly. It allows developers to automate tasks in applications like Microsoft Office from other programming environments, enhancing productivity and integration.
Ques:- How do you handle error conditions in your code?
Right Answer:
I handle error conditions in my code by using structured exception handling, such as Try...Catch blocks in VB. I log the error details for debugging, provide user-friendly messages, and ensure the application can recover gracefully or fail safely.
Ques:- How can you force new objects to be created on new threads?
Asked In :-
Right Answer:
You can force new objects to be created on new threads by using the `Thread` class to instantiate a new thread and then create the object within the thread's `Start` method. For example:

```vb
Dim newThread As New Thread(AddressOf CreateNewObject)
newThread.Start()

Sub CreateNewObject()
Dim myObject As New MyClass()
' Use myObject here
End Sub
```
Ques:- What is DDE?
Asked In :- Canoe Technologies,
Right Answer:
DDE stands for Dynamic Data Exchange. It is a protocol used in Windows for inter-process communication, allowing applications to share data and send commands to each other in real-time.
Ques:- Suppose emp is one class that we have to create, and have to add empname, empid as member of this class, what should be the code for that ? how we can calculate the salary for emp ? pl explain steps.
Asked In :-
Right Answer:
```vb
Public Class Emp
' Member variables
Public empName As String
Public empId As Integer
Private salary As Decimal

' Constructor to initialize empName and empId
Public Sub New(name As String, id As Integer)
empName = name
empId = id
End Sub

' Method to set salary
Public Sub SetSalary(amount As Decimal)
salary = amount
End Sub

' Method to calculate salary (for example, returning the salary)
Public Function CalculateSalary() As Decimal
Return salary
End Function
End Class
```
Ques:- Which is the new version of visual basic and what is difference between vb 5.0 and vb 6.0?
Asked In :-
Right Answer:
The new version of Visual Basic is Visual Basic .NET (VB.NET). The main differences between VB 5.0 and VB 6.0 include enhanced support for object-oriented programming in VB 6.0, improved user interface controls, and the introduction of the ActiveX technology in VB 6.0, which allows for better integration with web applications and components. Additionally, VB 6.0 has better database connectivity options compared to VB 5.0.
Ques:- Have you developed COM+ components? Any other types of server based components?
Asked In :-
Right Answer:
Yes, I have developed COM+ components, as well as other types of server-based components such as ASP.NET web services and Windows services.
Ques:- What is the max size allowed for Extension in Visual Basic
Asked In :- phonepe,
Right Answer:
The maximum size allowed for an extension in Visual Basic is 255 characters.
Ques:- Can you tell me how we make Crystal Report?
Asked In :-
Right Answer:
To create a Crystal Report, follow these steps:

1. Open Crystal Reports.
2. Select "File" > "New" > "Standard Report."
3. Choose a data source (like a database or an existing dataset).
4. Use the "Field Explorer" to drag and drop fields onto the report design surface.
5. Format the report layout as needed (headers, footers, groups).
6. Add any necessary formulas or parameters.
7. Preview the report to check the output.
8. Save the report and export it if needed.
Ques:- What is the starting Index value? How to locate it?
Asked In :- Wexford County Council,
Right Answer:
The starting index value in VB (Visual Basic) is typically 0 for arrays and collections. You can locate it by using the `LBound` function, which returns the lower bound of an array. For example, `LBound(arrayName)` will give you the starting index.
Ques:- How do you register a component?
Right Answer:
To register a component in VB, you can use the `RegisterActiveX` method or manually register it using the `regsvr32` command in the command prompt, specifying the path to the DLL or OCX file.
Ques:- How many tabs in a tabbed dialog do you consider appropriate?
Asked In :-
Right Answer:
Typically, 5 to 7 tabs in a tabbed dialog are considered appropriate for usability and clarity.
Ques:- How can you tell what kind of object an object variable is holding?
Asked In :-
Right Answer:
You can use the `TypeOf` operator in VB to check the type of an object variable. For example:

```vb
If TypeOf myObject Is MyClass Then
' myObject is of type MyClass
End If
```
Ques:- What versions of Windows have you used? Have you used any other operating systems?
Asked In :- mindpearl,
Right Answer:
I have used Windows 10, Windows 8, Windows 7, and Windows XP. I have also used Linux and macOS.
Ques:- Kind of components can be used as DCOM servers?
Asked In :-
Right Answer:
DCOM servers can be implemented using COM components such as ActiveX DLLs, ActiveX EXEs, and .NET assemblies.
Ques:- What are the type of validation available in VB?
Right Answer:
In VB, the types of validation available are:

1. **Required Field Validation** - Ensures that a field is not left empty.
2. **Range Validation** - Checks if a value falls within a specified range.
3. **Format Validation** - Ensures that the data is in the correct format (e.g., date, email).
4. **Type Validation** - Confirms that the data is of the expected type (e.g., integer, string).
5. **Custom Validation** - Allows for user-defined validation rules.


The Visual Basic (VB) category on takluu.com is tailored for developers and IT professionals preparing for interviews focused on VB programming and application development. Visual Basic, a product of Microsoft, offers an event-driven programming environment ideal for building user-friendly Windows desktop applications rapidly.

This section covers fundamental and advanced topics including VB syntax, variables, data types, control structures, procedures, functions, error handling, and event-driven programming. You will also find detailed explanations on working with forms, controls, ActiveX components, and database connectivity using ADO or DAO.

Interview questions often focus on your ability to write efficient code, debug applications, and design intuitive interfaces. Candidates preparing for roles such as VB Developer, Software Engineer, or Application Programmer will benefit from learning about object-oriented features in VB, modular programming, and integration with other Microsoft technologies like Excel VBA.

The content also addresses real-world scenarios like automating business processes, managing user inputs, and handling exceptions gracefully. Understanding legacy VB applications and transitioning to VB.NET or other modern platforms is an added advantage.

At Takluu, we provide comprehensive study materials, coding examples, and interview tips to help you master Visual Basic and succeed in your technical interviews.

Whether you are a beginner or experienced developer, this category equips you with the skills needed to build robust Windows applications and excel in your career.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users