About OLEDB connection class :
- This class is used to open a connection with any type of database and also used to start transactions.
- This class is inherited from the System. Data. Common.Connection class,
Which is an abstract class.
AS per the above observations, all types of connection classes will be having the same method names and same property names.
These core tutorials will help you to learn the fundamentals of .NET. For an in-depth understanding and practical experience, explore Online ".NET Training"
- Server version:
- Connection String:
- open ()
- close ()
- Dispose ()
- Begin Transaction
Con. open (); Con . close (); Con. Open ();
About oledb command class :
- This class is used to execute DDL, DML, TCL, QL, and Stored procedures.
Check Out .NetTutorial
DDL: create, alter, drop DML: insert, delete, update TCL: commit, rollback, savepoint QL: select Stored Procedure is a collection of SQL Statements.
- Command Text
- Command Type
- Execute Non-Query ():- is used to execute DDL, DML, TCL, and stored procedure.
- Execute Reader (): need to be used when multiple records are expecting from a select statement.
Execute Reader () returns Data reader.
- Execute Scalar (): Search only for the first match, its match is found, then only the first column value will be returned.
ENO ENAME SAL
1 Ravi 5000
- Teja 9000
- Raj 8000
1000 Select * from EMP ;
Execute Reader () ALL
Execute Scalar () ALL