Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. 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 or System.Data.OracleClient???????

Scheduled Pinned Locked Moved Visual Basic
databasecsharporaclecom
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    slam Iqbal
    wrote on last edited by
    #1

    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

    S L 2 Replies Last reply
    0
    • S slam Iqbal

      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

      S Offline
      S Offline
      Steven J Jowett
      wrote on last edited by
      #2

      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.

      S 1 Reply Last reply
      0
      • S slam Iqbal

        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

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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:

        S 1 Reply Last reply
        0
        • S Steven J Jowett

          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.

          S Offline
          S Offline
          slam Iqbal
          wrote on last edited by
          #4

          :-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.

          S 1 Reply Last reply
          0
          • L Lost User

            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:

            S Offline
            S Offline
            slam Iqbal
            wrote on last edited by
            #5

            :-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?

            L 1 Reply Last reply
            0
            • S slam Iqbal

              :-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?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              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:

              1 Reply Last reply
              0
              • S slam Iqbal

                :-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.

                S Offline
                S Offline
                Steven J Jowett
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups