Results 1 to 2 of 2

Thread: Type 'OracleConnection' is not defined

  1. #1

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Question Type 'OracleConnection' is not defined

    Hello,

    I'm having a bit of trouble creating an oracle connection can anyone see where I'm giong wrong

    I've set a reference to system.data.oracleclient in the references

    VB Code:
    1. [HL="#FFFF00"]<%@ Import Namespace="System" %>[/HL]
    2. [HL="#FFFF00"]<%@ Import Namespace="System.Data" %>[/HL]
    3. [HL="#FFFF00"]<%@ Import Namespace="System.Data.OracleClient" %>[/HL]
    4.  
    5. <script runat="server">
    6.     sub page_load
    7.         ' Put user code to initialize the page here
    8.         ' Create the connection string & sql query to be executed
    9.         Dim strSql = "SELECT id, Name FROM business"
    10.         Dim strCon = "Data Source=cont_dev;User Id=contdba;Password=mypwd;Integrated Security=no;"
    11.        
    12.         Dim oCon As New OracleConnection(strCon)
    13.         Dim oCmd As New OracleCommand(strSql)
    14.         Dim oReader As OracleDataReader
    15.        
    16.             oReader = oCmd.ExecuteReader()
    17.                 ' bind the repeater control
    18.         lob.DataSource = oReader
    19.         lob.DataBind()
    20.     end sub
    21.  
    22. </script>
    23. ...

    Any help or ideas will be greatly appreciated

    Cheers Al

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

Posting Permissions

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



Click Here to Expand Forum to Full Width