Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 14th, 2004, 12:08 PM
mel mel is offline
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.net page can't find namespace system.data.orac

Hi
I have an Oracle database to connect to. If I write the code in a class and compile it with vbc and then reference my namespace in the asp.net page it connects up to the database. If I just write call the code in an asp.net page and import the system.data.OracleClient, the page throws up an error saying it can't find the namespace
Can anyone help

Mel

  #2 (permalink)  
Old April 14th, 2004, 12:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Did you install the OracleClient?

  #3 (permalink)  
Old April 15th, 2004, 02:22 AM
mel mel is offline
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If the code is all contained as an assembley (ie a dll, compiled using the vbc command line tool) everything is ok. The Oracle client software is on the web server machine. It seems to have a problem referencing the Namespace if the code is all in an asp.net web page

  #4 (permalink)  
Old April 16th, 2004, 11:06 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you post just the relevant bits of code for this problem? Like the class declaration for the page and the import statements? We don't need all the guts of your page or the data access code, just the parts that relate directly to this problem.

I'm a little confused by your first post:
A) Is your custom class code consuming system.data.OracleClient classes and failing?
B) Is the ASP.net page trying to consume system.data.OracleClient classes and failing?
C) Is the ASP.net page trying to consume your custom class and failing?

Peter
-------------------------
Work smarter, not harder
  #5 (permalink)  
Old April 19th, 2004, 03:18 AM
mel mel is offline
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Just by including <%@ Import Namespace="System.Data.OracleClient" %> in an aspx web page causes the following error BC30466: Namespace or type 'OracleClient' for the Imports 'System.Data.OracleClient' cannot be found.

Line 19: Imports System.Data.OracleClient



  #6 (permalink)  
Old December 2nd, 2004, 05:17 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm having the same problem. I have installed the ODBC drivers and have installed ODP.net. There is a reference made in my project to Oracle.DataAccess.dll yet I still get the same message.

error BC30466: Namespace or type 'OracleClient' for the Imports 'System.Data.OracleClient' cannot be found.


Here is my code that just trys to make a simple connection to the database:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="OleDbConnection.aspx.vb" Inherits="tryagain.OleDbConnection"%>
<%@ Import NameSpace="System.Data.OracleClient"%>



<Script runat="server">
Sub Page_Load( s As Object, e As EventArgs )
    Dim conOracle As OracleConnection

    conOracle = New OracleConnection("Data Source=trng;User Id=burrjh;Password=melissa84;")
    conOracle.Open()
    conOracle.Close()
End Sub




</Script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
    <HEAD>
        <title>OracleDbConnection</title>
        <Script runat="server">



        </Script>
        <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout">
        Connection Opened!
        <form id="Form1" method="post" runat="server">
        </form>
    </body>
</HTML>

Thanks,

Jason

  #7 (permalink)  
Old December 2nd, 2004, 05:24 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just found the answer that worked for me.

I had the same error msg after installing this driver.
I added ref to project and registered System.Data.OracleClient.dll with gacutil but error continued.
When I copied the dll to the project bin directory, it was able to use the driver. It also continues to use it now that I have deleted the dll from the project bin.
A bit of a mystery to me but it seems to work.


hope this helps

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling Looped XML Data Into ASP.NET Page kwilliams ASP.NET 2.0 Professional 2 January 22nd, 2008 11:34 AM
syntax error?<%@ Import Namespace="System.Data" %> fjm9 ASP.NET 1.0 and 1.1 Basics 2 January 16th, 2007 11:51 AM
Syntax error? <%@ Import Namespace="System.Data" % fjm9 C# 1 January 16th, 2007 09:17 AM
using data filtered from asp.net page to generate ashutoshpandey31 Crystal Reports 0 March 12th, 2005 09:40 AM
How do I find the .dll name for a namespace? cjo ASP.NET 1.0 and 1.1 Basics 2 November 28th, 2003 03:47 PM



All times are GMT -4. The time now is 04:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.