how connect a Visual Basic express edition application to an Oracle database

Hi,

the title of this message, says quite everything I want to know. I'm developping a human ressource tool and the database I have to use has been developped with Oracle 9i. And I don't know how to connect my application made with visual studio 2005 express edition to Oracle

Tkanks everybody -)




Answer this question

how connect a Visual Basic express edition application to an Oracle database

  • Dave Irovic

    Project...Add Reference...from the .NET tab select System.Data.OracleClient. Click on OK.



  • Irina777

    thanks for everything Trucker, but i've got one last ( hopefully ;-) ) question:

    the thing is that my Oracle database is located on a network, where am I supposed to indicate the IP adress of the server hosting the database

    Thanks again!

    Julien



  • DenisG

    it's me again, i've add the reference System.Data.OracleClient

    But what should I do now How do I connect to my Oracle database

    Thanks again everybody for helping me out!

    Julien



  • b_shpungin

    ok!!

    thanks a lot!!



  • avanderlaan

    thanks a lot for that information, but the thing is I don't have this namespace. I have only access to System.data.SqlClient eventhough I have Oracle client 9i install on my computer. Any idea about something I could do

    Thanks



  • Gilbee

    You will have to code all the connection strings etc. yourself. Start here: http://www.connectionstrings.com/ Expand the Oracle Selection on the left and go to Oracle Connection (.Net) . There you will see an example for a connection string and Declaration. ( don't forget the Imports System.Data.OracleClient at the top of your class) And here is some sample code I found using Google:

    Here is sample VB.NET that uses Oracle database:

    Imports Microsoft.Data.Odbc
    ..
    Dim cn As OdbcConnection = New OdbcConnection("Driver=Microsoft ODBC for Oracle;uid=xxx;pwd=xxx;server=Oracle816")

    Dim cmd As OdbcCommand = New OdbcCommand("Select * FROM BIG_TABLE", cn)
    Dim da As OdbcDataAdapter = New OdbcDataAdapter(cmd)
    Dim ds As New DataSet()

    da.Fill(ds, "BIG_TABLE")

    DataGrid1.DataSource = ds.Tables("BIG_TABLE")

    Note that the Oracle client components need to be installed on the machine. The server name is the Oracle server alias. Also for Oracle databases, table names are case
    sensitive.

    Thanks,
    Hussein Abuthuraya
    Microsoft Developer Support

    So, hopefully, this will help you get going. Just modify the code to fit your needs.

    Good luck.

    james

    aka:Trucker


  • E Ingram

    You can use the System.Data.OracleClient namespace.



  • CsabaU

    Google is your friend

    http://oraclevsmicrosoft.blogspot.com/2004/12/connect-net-application-to-oracle.html

    This particular blog should provide you with the answers you need.

    james

    aka:Trucker


  • waiwaipang

    I'm sorry, i'm french my english computerwise isn't that good, what do you mean by add a reference

    Thanks for your help



  • Anthony Borton


    Did you add a reference to it



  • how connect a Visual Basic express edition application to an Oracle database