Friday, October 17, 2008

ADO.Net - ActiveX Data Object.Net

Hi Friends
Today I will be discussing Q&A on ADO.Net.

Q. What are Asynchronous Database Commands ?
Ans. When we execute any database, thread that is executing the command waits before the command get fully executed before executing any additional code. Thread is blocked for another process. Asynchronous Database Commands solve this problem when database command is executing, current thread can continue any other process. Thread can execute a no of database commands simultaneously. There are two benefits of using Asynchronous Database Commands.

1) Executing Multiple Database Commands simultaneously improve performance.
2) Since ASP.Net framework uses a limited pool service for request, when anyone request for a page it assigns a thread to handle the request.

Q. Why is ADO.NET serialization slower than ADO ?
Ans. ADO uses binary serialization while ADO.NET uses text based serialization. Since the text takes more space, it takes longer to write it out.
Q. How to get database schema information when connection object is established in ADO.NET ?

Ans. There is a method that helps in getting schema information that is GetSchema() and this method is called in three different ways; first way is when we call this method without any parameter it returns the metadata (table, view, stored procedure, indexes etc). When method is called by passing metadata collection name and filter criteria returns the items from the collection after applying the filter criteria and last way is when we called by passing a metadata collection name returns information about items found in the specified collection.

Q. Which one is better in .Net WebService or Remoting ?

Ans. Both of these are good but have little difference. WebService is helpful where the user who is using WebService doesnot have the .NET plateform. On the otherside for remoting we need .Net plateform on both server side and client side so in both of these remoting is faster then webservice.

Q. What is MARS support in ADO.NET ?

Ans. In First version of ADO.NET we could only do one connection on one result set. But the new feature allows us to do multiple commands on the same connection. Another feature is we can switch back and forth in command objects in connection. MARS means (Multiple Active ResultSets).
Keep Reading!!...
Cheers
Padhaku Einstein
Contact me at einstein.padhaku@gmail.com

No comments: