Find Interview Questions for Top Companies
Ques:- How to configure sql plus in asp.net?
Asked In :-
Right Answer:
To configure SQL Plus in ASP.NET, you need to:

1. Install Oracle Client on your server.
2. Set the environment variable `PATH` to include the Oracle Client's `bin` directory.
3. Use the `System.Diagnostics.Process` class in your ASP.NET code to call SQL Plus with the appropriate command-line arguments.

Example code snippet:

```vb.net
Dim process As New Process()
process.StartInfo.FileName = "sqlplus"
process.StartInfo.Arguments = "username/password@database"
process.StartInfo.UseShellExecute = False
process.StartInfo.RedirectStandardOutput = True
process.Start()
Dim output As String = process.StandardOutput.ReadToEnd()
process.WaitForExit()
```

Make sure to handle exceptions and manage security appropriately.
Ques:- Http://www.programmersheaven.com/2/dotnet-faq-vb
Asked In :-
Right Answer:
I'm sorry, but I cannot access external websites or specific URLs. Please provide the question directly, and I will be happy to help you with the answer.
Ques:- Can any body tell me the code procedure for preparing parameterized cristel reports.the report should be generated by taking to or more parameters.example: report should be genarated FROM DATE to TODATE
Asked In :-
Right Answer:
To create a parameterized Crystal Report in VB.Net that takes two parameters (From Date and To Date), follow these steps:

1. **Create the Crystal Report**:
- Open Crystal Reports and create a new report.
- Add the necessary data source.
- Create two parameters: `FromDate` and `ToDate`.

2. **Design the Report**:
- Use the parameters in your report's selection formula to filter data based on the dates:
```crystal
{YourDataTable.DateField} >= {?FromDate} AND {YourDataTable.DateField} <= {?ToDate}
```

3. **Add the Report to your VB.Net Project**:
- Add a Crystal Report Viewer to your form.

4. **Load the Report in VB.Net**:
```vb.net
Dim report As New YourCrystalReport()
Dim fromDate As DateTime = DateTimePickerFrom.Value
Dim toDate As DateTime =
Ques:- How do I write data to a text file in VB.NET?
Asked In :-
Right Answer:
To write data to a text file in VB.NET, you can use the `StreamWriter` class. Here is a simple example:

```vb.net
Using writer As New StreamWriter("pathtoyourfile.txt")
writer.WriteLine("Your text here")
End Using
```

This code creates a new text file (or overwrites an existing one) and writes the specified text to it.
Ques:- How do I find the path from where the application is running?
Asked In :-
Right Answer:
You can find the path from where the application is running in VB.Net using the following code:

```vb.net
Dim appPath As String = AppDomain.CurrentDomain.BaseDirectory
```

This will give you the directory path of the application's executable.
Ques:- What is the difference between string and stringbuilder?
Asked In :-
Right Answer:
The main difference between `String` and `StringBuilder` in VB.Net is that `String` is immutable, meaning once it is created, it cannot be changed. Any modification creates a new string. In contrast, `StringBuilder` is mutable, allowing for modifications without creating new instances, making it more efficient for frequent string manipulations.
Ques:- Destructors are used to de-allocate resources i.e. to clean up after an object is no longer available.Finalize is the destructor which is normally used. Finalize is called automatically when the .NET runtime determines that the object is no longer being u
Asked In :-
Right Answer:
In VB.Net, the `Finalize` method acts as a destructor and is called by the garbage collector to clean up resources when an object is no longer in use. It is automatically invoked by the .NET runtime, allowing for resource deallocation before the object is removed from memory.
Ques:- How can i extract the formated word(bold,italic,underline,font,color etc) from the msword file.
Asked In :-
Right Answer:
To extract formatted text (bold, italic, underline, font, color, etc.) from a Word document in VB.Net, you can use the Microsoft Office Interop library. Here’s a simple example:

```vb.net
Imports Microsoft.Office.Interop.Word

Sub ExtractFormattedText(filePath As String)
Dim wordApp As New Application()
Dim doc As Document = wordApp.Documents.Open(filePath)

For Each para As Paragraph In doc.Paragraphs
For Each run As Range In para.Range.Words
Dim text As String = run.Text
Dim isBold As Boolean = run.Bold = 1
Dim isItalic As Boolean = run.Italic = 1
Dim isUnderline As Boolean = run.Underline <> WdUnderline.wdUnderlineNone
Dim fontName As String = run.Font.Name
Dim fontSize As Single = run.Font.Size
Dim fontColor As String = run.Font.Color.ToString()

' Process the
Ques:- How to convert the format of images in VB.NET?
Asked In :-
Right Answer:
To convert the format of images in VB.NET, you can use the `System.Drawing` namespace. Here’s a simple example:

```vb.net
Dim originalImage As Image = Image.FromFile("path_to_original_image.jpg")
originalImage.Save("path_to_new_image.png", System.Drawing.Imaging.ImageFormat.Png)
```

Replace `"path_to_original_image.jpg"` with the path of your source image and `"path_to_new_image.png"` with the desired output path and format.
Ques:- How to work with repeater controls and give small example program ?
Asked In :-
Right Answer:
To work with Repeater controls in VB.Net, you need to bind a data source to the Repeater and define the layout using templates. Here’s a small example:

1. **ASPX Markup:**
```aspx
<asp:Repeater ID="myRepeater" runat="server">
<HeaderTemplate>
<h3>Items List</h3>
</HeaderTemplate>
<ItemTemplate>
<div>
<%# Eval("ItemName") %> - <%# Eval("ItemPrice", "{0:C}") %>
</div>
</ItemTemplate>
<FooterTemplate>
<div>Total Items: <%# Container.DataItemCount %></div>
</FooterTemplate>
</asp:Repeater>
```

2. **Code-Behind (VB.Net):**
```vb.net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Is
Ques:- What are namespaces and what is the importance of them?
Asked In :-
Right Answer:
Namespaces are a way to organize and group related classes, interfaces, and other types in VB.Net. They help prevent naming conflicts by allowing the same name to be used in different contexts. The importance of namespaces lies in improving code readability, maintainability, and avoiding ambiguity in large projects.
Ques:- Whats the difference bt. .dll extension and .exe extension files?
Asked In :-
Right Answer:
A .dll (Dynamic Link Library) file is a library that contains code and data that can be used by multiple programs simultaneously, while a .exe (Executable) file is a program that can be run directly by the operating system.
Ques:- How to get the environment information in VB.NET?
Asked In :-
Right Answer:
You can get the environment information in VB.NET using the `System.Environment` class. For example:

```vb.net
Dim osVersion As String = Environment.OSVersion.ToString()
Dim machineName As String = Environment.MachineName
Dim userName As String = Environment.UserName
```

This will give you details like the operating system version, machine name, and user name.
Ques:- What are Satellite Assemblies?
Asked In :-
Right Answer:
Satellite assemblies are special .NET assemblies that contain only localized resources, such as strings and images, for a specific culture or language. They allow applications to support multiple languages without needing to include all resources in the main assembly.
Ques:- What is Try- Catch ?Finally Exception Handling?
Asked In :- channel 4,
Right Answer:
Try-Catch-Finally is a mechanism in VB.Net for handling exceptions.

- **Try**: Contains code that may throw an exception.
- **Catch**: Contains code that runs if an exception occurs in the Try block, allowing you to handle the error.
- **Finally**: Contains code that runs after the Try and Catch blocks, regardless of whether an exception occurred, typically used for cleanup activities.
Ques:- What is the difference between vb and vb.net ?
Asked In :- elevate k-12,
Right Answer:
VB (Visual Basic) is a programming language that is primarily used for creating Windows applications and is based on the older BASIC language. VB.NET, on the other hand, is an object-oriented programming language that is part of the .NET framework, allowing for more advanced features such as inheritance, interfaces, and better integration with other .NET languages. VB.NET also supports modern programming practices and is designed for web and desktop applications, while VB is more limited in functionality and scope.
Ques:- Differences between VB.Net and C#, related to OOPS concepts
Asked In :- LibSys,
Right Answer:
1. **Syntax**: VB.Net uses a more verbose syntax with keywords like `Dim`, `If...Then...Else`, while C# uses a more concise syntax with `var`, `if`, etc.

2. **Case Sensitivity**: C# is case-sensitive, meaning `Variable` and `variable` are different, whereas VB.Net is not case-sensitive.

3. **Properties**: In VB.Net, properties can be defined using `Get` and `Set` keywords, while C# uses `{ get; set; }` syntax.

4. **Events**: VB.Net has built-in support for events with the `Handles` keyword, while C# uses delegates and event handlers explicitly.

5. **Inheritance**: Both support inheritance, but C# allows multiple interface inheritance, while VB.Net does not.

6. **Access Modifiers**: C# has more access modifiers (like `internal`), while VB.Net has `Public`, `Private`, `Friend
Ques:- How to insert row by row data in datagrid ?
Right Answer:
To insert row by row data in a DataGrid in VB.Net, you can use the following code snippet:

```vb.net
' Assuming you have a DataTable bound to the DataGrid
Dim newRow As DataRow = yourDataTable.NewRow()
newRow("ColumnName1") = value1
newRow("ColumnName2") = value2
' Add more columns as needed
yourDataTable.Rows.Add(newRow)
```

Make sure to replace `yourDataTable`, `ColumnName1`, `ColumnName2`, `value1`, and `value2` with your actual DataTable and column names.
Ques:- Is it possible to create a folder on the specified location in the database through VB.net.My Requirement is to create a folder on the given location in the database .
Asked In :-
Right Answer:
No, you cannot create a folder in a database directly through VB.Net. However, you can create a folder in the file system at a specified location using VB.Net code, but this is separate from the database itself.
Ques:- How do I get the screen resolution of my working area?
Asked In :-
Right Answer:
You can get the screen resolution of your working area in VB.Net using the following code:

```vb.net
Dim workingArea As Rectangle = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea
Dim width As Integer = workingArea.Width
Dim height As Integer = workingArea.Height
```

This will give you the width and height of the working area.


VB.Net (Visual Basic .NET) is a powerful, object-oriented programming language created by Microsoft and is a core component of its .NET ecosystem. It was introduced as the successor to the popular Visual Basic 6, but with a significant shift in its underlying architecture and capabilities. Unlike its predecessor, which was not a true object-oriented language, VB.Net was built from the ground up to be fully compliant with object-oriented principles, including inheritance, polymorphism, and encapsulation.

One of the key design philosophies behind VB.Net is its readable and intuitive syntax, which was intended to make it accessible to a wider range of developers, especially those transitioning from the older Visual Basic. Its verbose syntax, which includes keywords like Sub and End If, makes the code easier to read and understand. Because it runs on the .NET Common Language Runtime (CLR), VB.Net code is compiled into an intermediate language (IL), which allows it to seamlessly interoperate with other .NET languages like C#. This means developers can use both languages within the same project, leveraging the strengths of each.

VB.Net is a versatile language used for developing a variety of applications. It is particularly well-suited for building Windows desktop applications using technologies like Windows Forms and WPF. It is also used in conjunction with ASP.NET for web development and can be used to create console applications, libraries, and other components. While C# has become the more dominant language in the modern .NET landscape, VB.Net is still actively supported by Microsoft and remains a viable choice, particularly for organizations with a history of using Visual Basic or in situations where its simple syntax is preferred for rapid application development. It is a testament to the language’s enduring design that it continues to be a relevant tool in the modern software development world.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

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