Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient???????
-
Which one is the best for oracle server? System.Data.OleDb(.Net Faramework Data provider for ole db) or System.Data.OracleClient(.Net Faramework Data provider for Oralce)?:confused: i'm using vb.net8
Public Shared DB_Connection As New OleDbConnection, DB_Command As New OleDbCommand
Or
Public Shared DB_Connection As New OracleConnection, DB_Command As New OracleCommand
I have creted a class ORACLE_SQL.vb for some basic oparation(DDL,DML) in oracle server. 3 pc are connected to a single database server. Both '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce' works replacing (swaping) the above Declarations and few more modification. But i don't know which is the best. Can u plz tell me about the different between '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce'? Thanks for reading my Q :-D .
Here is some code of ORACLE_SQL.vb class: Public Sub New() If DB_Connection.State <> ConnectionState.Open Then Dim CONNECTION_STRING As String = "" 'NewTec_Connection provides a default security for my app Dim NC As New NewTec_Connection CONNECTION_STRING = "Server=" & NC.ServerName & ";Uid=" & NC.UserName & ";Pwd=" & NC.Password Try DB_Connection = New OracleConnection(CONNECTION_STRING) DB_Connection.Open() 'Create a transaction point BeginTransaction() Catch ex As Exception MsgBox("Can't use New() without having connection with 'NewTec' Server! Try New($) or New($,$,$) constructor.", MsgBoxStyle.Critical) Throw ex End Try 'different types connections for oledb 'CONNECTION_STRING = "Provider=OraOLEDB.Oracle.1;Password=mypw;Persist Security Info=True;User ID=myname;Data Source=myserver" 'mdb'= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileName 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\DDLTEST.mdb;Persist Security Info=True;Jet OLEDB:Database Password=asd 'pw access="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\pwdb.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***" 'ms sql=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=iZMA\SQLEXPRESS 'CONNECTION_STRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog
-
Which one is the best for oracle server? System.Data.OleDb(.Net Faramework Data provider for ole db) or System.Data.OracleClient(.Net Faramework Data provider for Oralce)?:confused: i'm using vb.net8
Public Shared DB_Connection As New OleDbConnection, DB_Command As New OleDbCommand
Or
Public Shared DB_Connection As New OracleConnection, DB_Command As New OracleCommand
I have creted a class ORACLE_SQL.vb for some basic oparation(DDL,DML) in oracle server. 3 pc are connected to a single database server. Both '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce' works replacing (swaping) the above Declarations and few more modification. But i don't know which is the best. Can u plz tell me about the different between '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce'? Thanks for reading my Q :-D .
Here is some code of ORACLE_SQL.vb class: Public Sub New() If DB_Connection.State <> ConnectionState.Open Then Dim CONNECTION_STRING As String = "" 'NewTec_Connection provides a default security for my app Dim NC As New NewTec_Connection CONNECTION_STRING = "Server=" & NC.ServerName & ";Uid=" & NC.UserName & ";Pwd=" & NC.Password Try DB_Connection = New OracleConnection(CONNECTION_STRING) DB_Connection.Open() 'Create a transaction point BeginTransaction() Catch ex As Exception MsgBox("Can't use New() without having connection with 'NewTec' Server! Try New($) or New($,$,$) constructor.", MsgBoxStyle.Critical) Throw ex End Try 'different types connections for oledb 'CONNECTION_STRING = "Provider=OraOLEDB.Oracle.1;Password=mypw;Persist Security Info=True;User ID=myname;Data Source=myserver" 'mdb'= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileName 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\DDLTEST.mdb;Persist Security Info=True;Jet OLEDB:Database Password=asd 'pw access="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\pwdb.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***" 'ms sql=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=iZMA\SQLEXPRESS 'CONNECTION_STRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog
The Oracle provide is specifically written for interaction with Oracle databases (likewise the SqlClient is specifically from MS SQL Server databases) and therefore would provide better performance, but would limit your program to work purely with Oracle. The OleDb is a more generic interface with would mean that you could use pritty much any SQL compatible database system such as Oracle, SQL Server MS Access, MySQL etc as your back-end database provided you limit your interact with the database to pure ISO SQL command.
Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.
-
Which one is the best for oracle server? System.Data.OleDb(.Net Faramework Data provider for ole db) or System.Data.OracleClient(.Net Faramework Data provider for Oralce)?:confused: i'm using vb.net8
Public Shared DB_Connection As New OleDbConnection, DB_Command As New OleDbCommand
Or
Public Shared DB_Connection As New OracleConnection, DB_Command As New OracleCommand
I have creted a class ORACLE_SQL.vb for some basic oparation(DDL,DML) in oracle server. 3 pc are connected to a single database server. Both '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce' works replacing (swaping) the above Declarations and few more modification. But i don't know which is the best. Can u plz tell me about the different between '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce'? Thanks for reading my Q :-D .
Here is some code of ORACLE_SQL.vb class: Public Sub New() If DB_Connection.State <> ConnectionState.Open Then Dim CONNECTION_STRING As String = "" 'NewTec_Connection provides a default security for my app Dim NC As New NewTec_Connection CONNECTION_STRING = "Server=" & NC.ServerName & ";Uid=" & NC.UserName & ";Pwd=" & NC.Password Try DB_Connection = New OracleConnection(CONNECTION_STRING) DB_Connection.Open() 'Create a transaction point BeginTransaction() Catch ex As Exception MsgBox("Can't use New() without having connection with 'NewTec' Server! Try New($) or New($,$,$) constructor.", MsgBoxStyle.Critical) Throw ex End Try 'different types connections for oledb 'CONNECTION_STRING = "Provider=OraOLEDB.Oracle.1;Password=mypw;Persist Security Info=True;User ID=myname;Data Source=myserver" 'mdb'= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileName 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\DDLTEST.mdb;Persist Security Info=True;Jet OLEDB:Database Password=asd 'pw access="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\pwdb.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***" 'ms sql=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=iZMA\SQLEXPRESS 'CONNECTION_STRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog
kisukortechai wrote:
System.Data.OleDb(.Net Faramework Data provider for ole db)
That's a "general" database driver, and can be used to connect to SQL, Oracle or MS Access.
kisukortechai wrote:
System.Data.OracleClient(.Net Faramework Data provider for Oralce)
That's the one that was created specific for Oracle, somewhat comparable to System.Data.SqlClient for SQL Server. This one is said to be faster and will have better support for Oracle-specific type and functions.
I are Troll :suss:
-
The Oracle provide is specifically written for interaction with Oracle databases (likewise the SqlClient is specifically from MS SQL Server databases) and therefore would provide better performance, but would limit your program to work purely with Oracle. The OleDb is a more generic interface with would mean that you could use pritty much any SQL compatible database system such as Oracle, SQL Server MS Access, MySQL etc as your back-end database provided you limit your interact with the database to pure ISO SQL command.
Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.
:-D Thanks To: Steve Jowett It’s a dedicated class for oracle server. So other databases (MySQL, MS SQL or MS Access) are not considered while build-up it. I’m pleased for your advice but I can’t totally understand what u said bellow (about comment) of your Reply. 1st time I used ole db but that had a problem inserting date before 2000(‘1-jan-2000’ no error but before that date ’31-Dec-1999’ date generated an error) generated a strange error. So finally choose OracleProvider.
-
kisukortechai wrote:
System.Data.OleDb(.Net Faramework Data provider for ole db)
That's a "general" database driver, and can be used to connect to SQL, Oracle or MS Access.
kisukortechai wrote:
System.Data.OracleClient(.Net Faramework Data provider for Oralce)
That's the one that was created specific for Oracle, somewhat comparable to System.Data.SqlClient for SQL Server. This one is said to be faster and will have better support for Oracle-specific type and functions.
I are Troll :suss:
:-D Thanks To: Eddy Vluggen I’m working only for Oracle server so in future I’ll need ole db if I change my mind. Am I okay?
-
:-D Thanks To: Eddy Vluggen I’m working only for Oracle server so in future I’ll need ole db if I change my mind. Am I okay?
You'd be largely okay;
- you'd be a bit more okay if you'd program against the interfaces. There's an CodeProject article here[^] that uses IDbConnection to make it easier to switch to another client.
- Other databases might speak a different SQL dialect. Oracle favors PL/SQL, SQL Server favors TSQL.
- There's also a small difference in formatting a parameter.
And you're welcome, off course :)
I are Troll :suss:
-
:-D Thanks To: Steve Jowett It’s a dedicated class for oracle server. So other databases (MySQL, MS SQL or MS Access) are not considered while build-up it. I’m pleased for your advice but I can’t totally understand what u said bellow (about comment) of your Reply. 1st time I used ole db but that had a problem inserting date before 2000(‘1-jan-2000’ no error but before that date ’31-Dec-1999’ date generated an error) generated a strange error. So finally choose OracleProvider.
Based on what you said
kisukortechai wrote:
It’s a dedicated class for oracle server
the Oracle provider is the right choice.
Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.