GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  VB.NET
Go To First  |  Previous Question  |  Next Question 
 VB.NET  |  Question 39 of 60    Print  
When do we use imports.system.sqlclient and when imports.system.oledb?

What is the purpose of using executenonquery?

  
Total Answers and Comments: 6 Last Update: August 20, 2008     Asked by: nafees 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Anupam Rai
 
System.Data.OleDB
 It contains the objects that we  use to connect to a data source via an OleDB provider , such as OleDbConnection,  OleDBCOmmand
 

System.Data.SqlClient
It contains objects that we use to connect to a data source via Tabular data stream interface provided by Microsoft Sql Server. This can be generally used to provide better performance because it removes some of the intermediate layers required by the OleDB provider. 

Above answer was rated as good by the following members:
surendra_sahu786
June 08, 2007 23:35:39   #1  
Anupam Rai        

RE: When do we use imports.system.sqlclient and when i...
System.Data.OleDB
It contains the objects that we use to connect to a data source via an OleDB provider such as OleDbConnection OleDBCOmmand


System.Data.SqlClient
It contains objects that we use to connect to a data source via Tabular data stream interface provided by Microsoft Sql Server. This can be generally used to provide better performance because it removes some of the intermediate layers required by the OleDB provider.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 14, 2007 12:08:48   #2  
itgirl Member Since: December 2007   Contribution: 2    

RE: When do we use imports.system.sqlclient and when imports.system.oledb?What is the purpose of using executenonquery?
Executenonquery does not return any value unlike executequery which return values for select insert update
 
Is this answer useful? Yes | No
February 15, 2008 13:18:49   #3  
developeramit.net Member Since: February 2008   Contribution: 4    

RE: When do we use imports.system.sqlclient and when imports.system.oledb?What is the purpose of using executenonquery?
system.oledb or system.sqlclient both are use for connectvity to database


execute query returns value its uses selct statement
executenon query not return value through this we insert update delete statement performed

 
Is this answer useful? Yes | No
March 06, 2008 05:57:24   #4  
vinaymoodnur Member Since: March 2008   Contribution: 1    

RE: When do we use imports.system.sqlclient and when imports.system.oledb?What is the purpose of using executenonquery?
imports.system.sqlclient is used when using sql server as database
imports.system.sqlclient is used when using access as database
executenonquery is used when executing DML (insert update delete operations).
hope this answers the question adequately

 
Is this answer useful? Yes | No
April 03, 2008 08:33:42   #5  
Diptikanta Member Since: March 2008   Contribution: 2    

RE: When do we use imports.system.sqlclient and when imports.system.oledb?What is the purpose of using executenonquery?

Imports system.sqlclient is used only for MSSqlserver database.
Imports system.oledb is used for any other databases including MSSqlserver.

Executenonquery is used for Insert Update Delete command. And It returns an integer value that number of records affected.

And Executequery is used for select command and it returns an result object.


 
Is this answer useful? Yes | No
August 20, 2008 06:08:39   #6  
pradhib.l Member Since: August 2008   Contribution: 5    

RE: When do we use imports.system.sqlclient and when imports.system.oledb?What is the purpose of using executenonquery?
There are two methods used for disconnected architecture one is
1) Execute Scaler
2) execute nonquery

Execute Scalar: It is for math functions (min max add sub)

Execute Nonquery: It is used for insert update delete operations.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape