RE: connecting VB dot Net to Oracle 8i

From: Mark (anonymous_at_discussions.microsoft.com)
Date: 03/30/04


Date: Tue, 30 Mar 2004 07:21:07 -0800

Here's a code snippet. Try getting into C++. Good luck.
Don't forget to add a refrence to System.Data.

Dim strSource As String
    Dim lpConnection As System.Data.OleDb.OleDbConnection
    Dim UserID As String
    Dim Password As String
    Dim Source As String

    'open the connection
    UserID = "ORACLEUSER"
    Password = "ORACLEPASSWORD"
    Source = "ORACLESERVER"
    lpConnection = New System.Data.OleDb.OleDbConnection

    lpConnection.ConnectionString = "Provider=MSDAORA.1;User ID = " + UserID _
    & ";Password = " + Password + ";Data Source = " + source _
    & ";Persist Security Info = False"

    lpConnection.Open()

    'get the data
    Dim lpAdapter As System.Data.OleDb.OleDbDataAdapter
    Dim lpDataTable As New System.Data.DataTable

    lpAdapter = New System.Data.OleDb.OleDbDataAdapter("select * from TABLE_NAME", lpConnection)

    lpAdapter.Fill(lpDataTable)

    MessageBox.Show(lpDataTable.Rows.Count)



Relevant Pages

  • Search pattern
    ... Dim strfile As String ... Dim bAddressFound As Boolean ... Dim strCurrentChar As String ...
    (comp.databases.ms-access)
  • Re: multiplatform (pocketPC & desktopPC) (Daniel !!)
    ... Friend Versione As String ... Public Sub GetMyConnectionPalmare() ... Dim errorMessages As String ... Private Function GetDS_Desktop(ByVal SQL As String) As DataSet ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: multiplatform (pocketPC & desktopPC) (Daniel !!)
    ... Friend Versione As String ... Public Sub GetMyConnectionPalmare() ... Dim errorMessages As String ... Private Function GetDS_Desktop(ByVal SQL As String) As DataSet ...
    (microsoft.public.dotnet.framework.compactframework)
  • Help answer these 70-310 questions
    ... One argument is the string ... Dim output As New StringBuilder ... EmployeeLocations. ... You create a strongly named serviced component. ...
    (microsoft.public.cert.exam.mcad)
  • Help answer these 70-310 questions
    ... One argument is the string ... Dim output As New StringBuilder ... EmployeeLocations. ... You create a strongly named serviced component. ...
    (microsoft.public.cert.exam.mcsd)