| Back to Questions Page |
| |
| Question |
Regarding Types of compatability in VB and their usage ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Sweety |
| This Interview Question Asked @ Satyam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | no compatabiliyt
binary compatibility
project compatability etc  |
| Anony |
| |
| |
| Question |
what are the types of threading models in VB.net ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Sweety |
| This Interview Question Asked @ Satyam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | There are lot of threading model available, but we focus on
threadingmodels that are common to win32based environments
singleThreaded:There is only one thread with in the
process,and it is doing all the work for the process.The
process must wait for the current execution of the thread
to complete before it can perform another action.
Apartment Threading (Single Threaded Apartment)
Apartment threaded means there are multiple threads within
the application. In single threaded apartment (STA) each
thread is isolated in a separate apartment underneath the
process. The process can have any number of apartments that
share data through a proxy. The application defines when
and for how long the thread in each apartment should
execute. All requests are serialized through the Windows
message queue such that only a single apartment is accessed
at a time and thus only a single thread will be executing
at any one time
Free Threading (Multi Threaded Apartment)
Free threaded applications were limited to programming
languages such as C++ until the release of Microsoft .NET.
The free threaded/Multi Threaded Apartment (MTA) model has
a single apartment created underneath the process rather
than multiple apartments. This single apartment holds
multiple threads rather than just a single thread. No
message queue is required because all of the threads are a
part of the same apartment and can share data without a
proxy.
The developer must provide thread synchronization as part
of the code to ensure that threads do not simultaneously
access the same resources
 |
| Praveena |
| |
| |
| Question |
what are the advantage in vb.net and different between vb
and vb.net |
Rank |
Answer Posted By |
|
Question Submitted By :: Santhapandian |
| This Interview Question Asked @ TCS , Data Amruth Pvt Ltd, Zansa, Infosys |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | vb is not follow the oops concept.But vb.net follow the
oops concept.  |
| Guest |
| |
| |
|
|
| |
| Answer | Adv of VB.NET
vb is object based.vb.net is object oriented
vb use record set for database connection
vb.net use dataset for database connection  |
| Ashok |
| |
| |
| Answer | 1. VB uses vb runtime while vb.net uses CLR
2. VB object based,vb.net is object oriented
3. VB Suports splash screen
4. VB Uses on error goto while vb.net uses Try..
Catch..Finally
5. vb.Net Supports inheritance  |
| Rahul Godse |
| |
| |
| Answer | 1)vb.net provide XML conversion
2)vb.net provide disconnect architecture
3)vb.net object orineted base
4) any think is class
vb 6.0
1)not support XML
2)not support ado.net so no support disconnect architecture
3)in vb first create class then call object  |
| Iftekhar |
| |
| |
| Question |
What is the Difference between Web User Control and Web
Custom Control? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | web user control where it predefined attribute functionality
where it resides in control library
web custom control: where it is defined by user itself and
store in a custom library  |
| Madduri Rajasekhar |
| |
| |
| Answer | Web User Controls:
1) Easy to Create
2) Limited support for consumers who use visual design tool
3) A seperate copy of the control is required in each
application.
4)Cannot be added to toolbox in Visual Studio.
5) Good for Static Layout
Web Custom Controls:
1) Harder to Create
2) Full support for consumers
3) Only a single copy of the control is required in the GAC
4)Can be added
5) Good for Dynamic Layout  |
| Aaraaayen |
| |
| |
| Answer | Plz refer the following link.It is very useful to know the
difference b/w User control and Custom control and also how
to create these controls.
http://support.microsoft.com/kb/893667
Kamal..........  |
| Kamalakannan.a |
| |
| |
| Answer | Web User Control inherits .NET class i.e
System.web.UI.UserControl
whereas web custom control does not do so.  |
| Nitin |
| |
| |
| Answer | What are the basic differences between user controls and custom controls?
Now that you have a basic idea of what user controls and custom controls are and how to create them, let's take a quick look at the differences between the two.
Factors User control Custom control
Deployment Designed for single-application scenarios
Deployed in the source form (.ascx) along with the source code of the application
If the same control needs to be used in more than one application, it introduces redundancy and maintenance problems Designed so that it can be used by more than one application
Deployed either in the application's Bin directory or in the global assembly cache
Distributed easily and without problems associated with redundancy and maintenance
Creation Creation is similar to the way Web Forms pages are created; well-suited for rapid application development (RAD) Writing involves lots of code because there is no designer support
Content A much better choice when you need static content within a fixed layout, for example, when you make headers and footers More suited for when an application requires dynamic content to be displayed; can be reused across an application, for example, for a data bound table control with dynamic rows
Design Writing doesn't require much application designing because they are authored at design time and mostly contain static data Writing from scratch requires a good understanding of the control's life cycle and the order in which events execute, which is normally taken care of in user controls  |
| Saran |
| |
| |
| Question |
What is an indexed property?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | you include the index parameter in the Property statement.
In this example, the test_number parameter is the index for
the Scores property.
Public Class Student
' The private array of scores.
Private m_Scores(9) As Integer
' The indexed Score property procedures.
Public Property Score(ByVal test_number As Integer) As _
Integer
Get
Return m_Scores(test_number)
End Get
Set(ByVal Value As Integer)
m_Scores(test_number) = Value
End Set
End Property
End Class  |
| Anil Sharma |
| |
| |
| Question |
What is versioning in .NET?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | main advantage of .net is versoning and solve very criticle
problem.
.net maintain one application with more then one version
and also solve DLL HELL problem because it can run same
application with diffrent version at a same time  |
| Anil Sharma |
| |
| |
| Answer | .Net have an Assembly.It gives the Portable Execution
file.The main use of assembly is to maintain the Dll and
exe's.
So sometimes the programmer confused to which is modified
code.That time the assembly provide the Version.
That is called versioning.
It is start from 1.0.*,.......  |
| Kamalakannan.a |
| |
| |
| Question |
What is DLL hell?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 1. Adding of a new virtual method to a class exported
from a DLL can cause the following problems:
o If class already has a virtual method B and we are
adding a new one named A before it, then we are changing
the table of virtual methods. Now the first virtual method
in the table will be A but not B and the client program
which calls B will fail without recompilation as the call
of B will cause the call of A and this is another method
which possibly has other parameters and return type.
o When a class doesn?t have virtual methods and none
of its base classes have, then adding of a new virtual
method to it or to its base class will cause adding of the
pointer for the table of virtual methods. This will cause
change in the class size. So the error will occur after a
client program will allocate memory for the class (an
amount of memory that was required before the class has
been changed) and will try to modify some of the class'
fields explicitly or implicitly. In this case, as the
pointer to the table of virtual method is added to the
beginning of the class, all addresses of the class fields
are shifted and thus we will get an abnormal client program
behavior or a runtime error.
o In case when a class has virtual methods or any of
its parent classes has, we can?t add virtual methods to
classes exported from the DLL if they participate in the
inheritance. We can?t add virtual methods not only to the
beginning of the class declaration but also to the end of
it. The problem is in shifting in the table of virtual
methods. Note that even if you add a new virtual method to
the end of the class declaration then the child?s virtual
methods will be shifted.
2. Adding of a new field (of any kind) to a class
declaration can cause following problems:
1. Adding of a new field to the end of a class causes
class size to change as in the case of adding of a virtual
method to a class that didn?t have any. The client program
will allocate less memory than it is required for a new
class and this will cause referencing to the memory out of
the class scope.
2. Adding of a new field between existing ones is even
worse. It will case all addresses of fields after the new
one to be shifted and a client application will work with
the incorrect addresses while working with the fields that
are situated after the new field. We also have the problem
as in the previous point here.  |
| Priya |
| |
| |
| Answer | Overwriting a older version of dll by a new version of dll
is known as Dll Hell problem.  |
| Subhash - Netedge Computing |
| |
| |
| Question |
How does you call and execute a SP in .NET? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Using command object we can execute a SP. Instead of sql
query we have to pass the SP Name.  |
| Ponnuraj |
| |
| |
| Answer | command.commection =coonectionstring
command.commandType=commandType.storedProcedure
command.commandtext="sp_name"
command.executenonquery()  |
| Anil Sharma |
| |
| |
| Question |
Why Datareader is useful?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Data reader is usefull when we just want to acccess datas
from the database not when we want to perform DML
operations. and It is usefull when we want to perform
forward only reading of datas.It wont requires any
large volume of resources in the Front end.  |
| Manikandan |
| |
| |
| Answer | Datareader is read only or forward only.So it is very fast
to fetch the data from database.  |
| Kamalakannan.a |
| |
| |
| Answer | 1)it is used for forward record only.
2)we cannot update or save
3)speed is fast than dataset
4)not persist any record
5)it is usefual in case of display data according to
critiera on form using control like textbox,label etc.
who to use
in vb.net
dim sqlcmd as new sqlcmd("select ename from tblemp where
empid=5;
dim dr as new dataReader
dr=sqlcmd.executeReader()
if dr.hasRows then
txtbox1.text(dr("ename"))
end if
this display ename in textbox.  |
| Payal |
| |
| |
| Answer | its connection oriented architecture.  |
| Bhushanam |
| |
| |
| Answer | Datareader is used to fetch the data frm data source  |
| Anitha |
| |
| |
| Question |
What is the difference between Dataset and Recordset? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | ? A DataSet can represent an entire relational database in
memory, complete with tables, relations, and views.
? A DataSet is designed to work without any continuing
connection to the original data source.
? Data in a DataSet is bulk-loaded, rather than being
loaded on demand.
? There's no concept of cursor types in a DataSet.
? DataSets have no current record pointer You can use For
Each loops to move through the data.
? You can store many edits in a DataSet, and write them to
the original data source in a single operation.
? Though the DataSet is universal, other objects in
ADO.NET come in different versions for different data
sources.
 |
| Vinayak |
| |
| |
| Answer | 1) With Data set you can retrive data from database like
oracle and SQL Server and manage them in one dataset, with
recordset this is not possible.
2) All representation of Dataset is using XML while
recordset uses COM.
3) Recordset can not be transmitted on HTTP while Dataset
can be.  |
| Shweta Mogadpally |
| |
| |
| Answer | 1) With Data set you can retrive data from database like
oracle and SQL Server and manage them in one dataset, with
recordset this is not possible.
2) All representation of Dataset is using XML while
recordset uses COM.
3) Recordset can not be transmitted on HTTP while Dataset
can be.  |
| Shweta Mogadpally |
| |
| |
| Answer | With Recordset comes the Recordset pointer, that points to
the relative data so retrieved from the database. The
Recordset object has MoveNext, MoveFirst, MovePrevious and
MoveLast methods that provides a means for Data Traversal
With DataSet there is no pointer that points to the record,
while a Bulk of Data is retrieved from the Database to the
Computer's Memory, and the record is accessed via the index
of the Record so retrieved.
With Recordset, has types of Cursors ie. Open Cursor and
Data Manipulation Cursor, which enables the cursor to be
open as read-only or dynamic (meaning for data
manipulations)
With Dataset as bulk of data is loaded to the Memory, only
Viewing operation is possible.
With Recordset, if the cursor is open as OpenDynamic and
OpenOptimistic, the Data manipulated by 1 user, its effect
is visible to the other user, leading to clear picture of
the Database, while this is not the case in DataSet.
DataSet can be viewed as a ONE WAY HIGHWAY, where the data
comes from Database to the Computer's Memory.
RecordSet can be viewed as a TWO WAY HIGHWAY, based on and
according to the Cursor type selected in the recordset  |
| Haynes R. Rajwadi |
| |
| |
| Answer | The Recordset was not XML-based and could not be serialized
to XML easily or flexibly.
Finally, a Recordset was not independent of a data store
because it tracked a Connection object
and through its methods could send queries to the data
source to populate, update,
and refresh its data.
To that end, the Recordset contained functionality found in
the ADO.NET DataSet,
data reader, and data adapter objects.
Similar to the DataSet, a Recordset could be disconnected
from its data store
and therefore act as an in-memory cache of data.
Of course, it could also be used in a connected model
depending on the cursor options that were set.
Although the Recordset object stored multiple versions of
each column for each of its rows,
it was not by nature able to represent multiple tables
without the use of the Data Shape Provider.  |
| Sathiyapriya |
| |
| |
| Answer | 1) With Data set you can retrive data from database like
oracle and SQL Server and manage them in one dataset, with
recordset this is not possible.
2) All representation of Dataset is using XML while
recordset uses COM.
3) Recordset can not be transmitted on HTTP while Dataset
can be  |
| Rahul |
| |
| |
| Answer | With Data set you can retrive data from database like
oracle and SQL Server and manage them in one dataset, with
recordset this is not possible.
2) All representation of Dataset is using XML while
recordset uses COM.
3) Recordset can not be transmitted on HTTP while Dataset
can be  |
| Sanny |
| |
| |
| Question |
How does you get record no from 5 to 15 from a dataset of
100 records? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ ABC |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | dim dRow as data.datarow
for i as interger = 5 to 15
drow = dSet.Tables(0).Rows(i)
'process row
next i  |
| Josh |
| |
| |
| Answer | For i as integer= 5 to 15 (Step 1)
msgbox ds.tables(0).rows(i)
Next i  |
| Anusuya |
| |
| |
| Question |
What is the Difference between Dataset and Datareader?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Datareader is forward and read only recordset in which the
data manipultions are cant carried. but dataset is the
miniature of database in which the datas can be accessed
randomly and data manipulations can be carried  |
| Manikandan |
| |
| |
| Answer | DataReader
Datareader is like a forward only recordset. It fetches one
row at a time so very less Network Cost compare to DataSet
(Fetches all the rows at a time). DataReader is readonly so
we cannot do any transaction on them. DataReader will be
the best choice where we need to show the data to the user
which requires no transaction ie reports. Due to DataReader
is forward only we cannot fetch the data randomly. .NET
Dataproviders optimizes the datareaders to handle the huge
amount of data.
DataSet
DataSet is always a bulky object that requires lot of
memory space compare to DataReader. We can say the dataset
as a small database coz it stores the schema and data in
the application memory area. DataSet fetches all data from
the datasource at a time to its memory area. So we can
traverse through the object to get required data like
qureying database.
The dataset maintains the relationships among the
datatables inside
it. We can manipulate the realational data as XML using
dataset.We can do transactions (insert/update/delete) on
them and finally the modifications can be updated to the
actual database. This provides impressive flexibility to
the application but with the cost of memory space. DataSet
maintains the original data and the modified data
seperately which requires more memory space. If the amount
of data in the dataset is huge
then it will reduce the applications performance
dramatically.
The following points will improve the performane of a
dataset...
1. Don't use the commandbuilder to generate the sql
statements.
Though it reduces the development time the query generated
by the command builder will not be always as required. For
example
To update the details of an author table the command  |
| Khawar Rizvi |
| |
| |
| Answer | Dataset is cache of records retrieve from data source.
Datareader is used to retrieve data from datasource.
1.Using Datareader we can read the data readnly,forwordonly
basis.
2.Only one record in a memmory at a tme
3.Faster
4.Doesnot hold any data
5.Data can not be transfer to datasource
Wher as in Dataset
1. we can read and write and allow us to navigate through
the records forword and backwords.
2.Pulls the records from the datasource and saves in IIS
memmory.
3.Slower
4.Holds datatables and has the information about
relationship between those tbes.
5.Data can be transfer to datasource  |
| Anitha |
| |
| |
| Answer | DataReader
Datareader is like a forward only recordset. It fetches one
row at a time so very less Network Cost compare to DataSet
(Fetches all the rows at a time). DataReader is readonly so
we cannot do any transaction on them. DataReader will be
the best choice where we need to show the data to the user
which requires no transaction ie reports. Due to DataReader
is forward only we cannot fetch the data randomly. .NET
Dataproviders optimizes the datareaders to handle the huge
amount of data.
DataSet
DataSet is always a bulky object that requires lot of
memory space compare to DataReader. We can say the dataset
as a small database coz it stores the schema and data in
the application memory area. DataSet fetches all data from
the datasource at a time to its memory area. So we can
traverse through the object to get required data like
qureying database.  |
| Vasudha.g.n |
| |
| |
| Question |
How do you declare static variable and how it is declared
and what is its lifetime?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Infosys |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Hi,
Static variables are declare through the
Static Var1 as Integer
The scop of the Var1 is within the module where its is
defined
 |
| Pratik |
| |
| |
| Answer | Static variables retains their values even after the
termination of the procedure in which it is declared.  |
| Sonia |
| |
| |
| Answer | Static variable are declared within the procedure.
and it preserves the value of variable.whether is
called 10000 times.no problem.  |
| Firoz Ahmed |
| |
| |
| Question |
What is the Difference between Overriding and overloading?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | overloading-------having same method name with different
signatures.
overriding--------methods name and signatures must be same.  |
| Vimal |
| |
| |
| Answer | OverLoading : All the method will share the same name but
it differes based on the parameter, type of parameter and
number of parameter
Overriding : The method in the derived class the has the
same name in the base class and it changes the behaviour or
functionality of the method in the base class.  |
| Lakshmi Prabha |
| |
| |
| Answer | Overloading: Methods have different signature but same
behavior or functionality.
Overriding: Methods have same signature but different bevior
or functionality.  |
| Raza Hussain Rajper |
| |
| |
| Answer | overloading has same method but different types of
parameters, number of parameters.
overloading does not take return type to differentiate
overloaded method.
ex:
int add(int a, int b)
int add(float a , float b)
are overloaded methods
overriding comes with inheritance concept.
here parent and child both contains the same method. and
when execution takes place; child's method is called.  |
| Prachee |
| |
| |
| Answer | OVERLOADING is the process of declaring the methods having
the same name but diff signatures. Signature means diff
types & number of arguments.
OVERRIDING is the process of overwriting the methods of
base class in Derived Class.  |
| Sonia |
| |
| |
| Answer | overriding: it just in inheritance and the overriding
method must hold the same name and the same signatures .
the change maybe just in behavior .
overloading : maybe in inheritance or in other way but must
to do overloading must the method hold the same name and
must change signatures.
remark:we can not only change th return type.  |
| Omar |
| |
| |
| Answer | 1-OverLoading is Resolved at COMPILE TIME.But Overridding is
resolved at RunTime.
2-OverLoaded Methods Can Change Access specifiers.in
overridding the access level of overridden method(in derived
class) must not be more restrictive than that of overridden
method(of base class)
3-Overloaded methods can declare new exceptions.But
overridden method must not throw new exceptions than those
declared by overridden method.  |
| Sudhakar Singh Rajput |
| |
| |
| Answer | overriding->
1) method should be public.
2)it need inheritance.
3)it need virtual keyword before it declartion.
4)it have same name with same parameter in diffrent class.
5)it require non-static method.
6)method should have same datatype.
Overloading->
1)method can be different access speicifier.
2)it doesn't need inheritacne.
3)all method should be in same class.
4)method can have diffrent datatypes  |
| Nazrul |
| |
| |
| Answer | OVERLOADING:- 1) overloaded methods have the same name but
different parameter list.
2)a subclass method can overload a superclass method
eg:-int add(int a, int b)
int add(float a , float b)
are overloaded methods
OVERRIDING:-
it just in inheritance and the overriding
method must hold the same name and the same signatures .
the change maybe just in behavior .
The Cat class in the following example is the subclass and
the Animal class is the superclass. The Cat class overrides
eat() method inherited from Animal class.
public class Animal {
public void eat() {
System.out.println("Eat for Animal");
}
}
public class Cat extends Animal {
public void eat() {
System.out.println("Eat for Cat");
}
}  |
| Deepika Singh |
| |
| |
| Answer | 1-OverLoading is Resolved at COMPILE TIME.But Overridding is
resolved at RunTime.
2-OverLoaded Methods Can Change Access specifiers.in
overridding the access level of overridden method(in derived
class) must not be more restrictive than that of overridden
method(of base class)
3-Overloaded methods can declare new exceptions.But
overridden method must not throw new exceptions than those
declared by overridden  |
| Sanjay |
| |
| |
| Answer | overloading-------having same function name but with
different signatures.
overriding--------function name and signatures must be same.  |
| Anu |
| |
| |
| Question |
What is shadowing? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | When global and local varible in the same name.
the local varibale in a mehod or function which use to
override the global is called the shadowing.
ie the Global varible is being shadowed by the
local varible  |
| Manikandan |
| |
| |
| Answer | If there are overloaded methods in the base class, & u
marks one of the methods as shadows using the keyword
shadow in the derived class, then we cannot access the
overloaded methods.
Ex-
public class base
public sub test()
console.writeline("sonia")
end sub
public sub test(i as integer)
console.writeline(i)
end sub
end class
public sub derived
inherirts base
shadows sub test(x as integer)
console.writeline("Shadow method")
end sub
end class
sub main()
dim obj as new derived
obj.test()-->Invalid
obj.test(10)-->Valid
end sub  |
| Sonia.sardana |
| |
| |
| Answer | Whatever the code written by Sonia.sardana is shows the
shadowing concept but there is some print mistakes in the
code.The correct code is---
imports system
module m1
public class base
Public Sub test()
Console.WriteLine("sonia")
End Sub
Public Sub test(ByVal i As Integer)
Console.WriteLine(i)
End Sub
End Class
Public class derived
inherits base
Shadows Sub test(ByVal x As Integer)
Console.WriteLine("Shadow method")
End Sub
end class
Sub main()
Dim obj As New derived
obj.test() 'This will show error
obj.test(10) 'This is valid
End Sub
end module  |
| Rohit |
| |
| |
|
| |
|
Back to Questions Page |