Oracle Database Connection

Results 1 to 2 of 2

Thread: Oracle Database Connection

  1. #1
    Join Date
    Dec 1969

    Default Oracle Database Connection

    I have an Oracle database that I am trying to connect to using .NET. I have proved that I am capable of accessing the data by using Access to import tables from the Oracle database and look at the data.<BR><BR>Unfortunately, I cannot programmatically connect to the database using .NET. I’ve tried the following code and both of the connection strings shown:<BR><BR>[code language="VB.NET"]<BR>Public Function GetDataSetOracle(ByVal sQuery As String) As DataSet<BR> Dim MyDS As DataSet<BR> &#039;Dim MyConnStr As String = "Data Source=PCMMC;User Id=clkdesignspecial;Password=clkdesignspecial;"<BR > Dim MyConnStr As String = "Server=PCMMC;Uid=clkdesignspecial;Pwd=clkdesignsp ecial;"<BR><BR> Dim MyConn As OracleClient.OracleConnection<BR> MyConn = New OracleClient.OracleConnection(MyConnStr)<BR> Dim MySelectStr As String = sQuery<BR> Dim AccessMyDBAdapter As OracleClient.OracleDataAdapter = New OracleClient.OracleDataAdapter(MySelectStr, MyConn)<BR> MyDS = New DataSet<BR> AccessMyDBAdapter.Fill(MyDS) &#039;Now your dataset is filled with data<BR> GetDataSetOracle = MyDS<BR>End Function<BR>[/code]<BR><BR>When I execute the application, it just hangs on the .Fill command. Any suggestions on connecting to my Oracle database?

  2. #2
    Join Date
    Dec 1969

    Default RE: Oracle Database Connection

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts