.NETGURU
odp.net error!?
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oracle' list.


Valmir Meneses
Hi Guys,
I need some help.
I have been in this list and perhaps for my early stage in .NET, I have not
understood the hints an tips directed to my issue.
My code is:

<%@ Import Namespace="System.Data.OracleClient" %>

<script language="VB" runat="server" Debug="true">

Sub Page_Load(Sender As Object, E As EventArgs)

Dim con As New OracleConnection("SERVER=aspnet;USER ID=system;PWD=manager")
Dim cmd As New OracleCommand

con.Open()
cmd = New OracleCommand("select * from categories;",con)

DataGrid1.DataSource = cmd.ExecuteReader()
DataGrid1.DataBind()

End Sub

</script>

<asp:DataGrid id="DataGrid1" runat="server"/>

And I get this error:

Compiler Error Message: BC30002: Type 'OracleConnection' is not defined.

Source Error:

Line 5: Sub Page_Load(Sender As Object, E As EventArgs)
Line 6:
Line 7: Dim con As New OracleConnection("SERVER=aspnet;USER
ID=system;PWD=manager")
Line 8: Dim cmd As New OracleCommand
Line 9:

The Oracle Client has been installed and tested!
The ODP.NET has also been installed and updated.

Thanks,

Reply to this message...
 
    
Sreedhar Koganti
<html><div style='background-color:'><DIV>
<P>OracleClient might not reffered I guess. Go to references, from there select OracleClient in VisualStudio.Net explicitly. Then it should work.<BR><BR>Sreedhar<BR><A href="http://www.w3coder.com"" target="_blank">http://www.w3coder.com";>http://www.w3coder.com</A></P>
<P> </P>
<P><BR><BR> </P></DIV>
<DIV></DIV>
<DIV></DIV>>From: Valmir Meneses <Click here to reveal e-mail address>
<DIV></DIV>>Reply-To: "ngfx-oracle" <Click here to reveal e-mail address>
<DIV></DIV>>To: "ngfx-oracle" <Click here to reveal e-mail address>
<DIV></DIV>>Subject: [ngfx-oracle] odp.net error!?
<DIV></DIV>>Date: Fri, 21 Jun 2002 16:47:43 +0100
<DIV></DIV>>
<DIV></DIV>>Hi Guys,
<DIV></DIV>>I need some help.
<DIV></DIV>>I have been in this list and perhaps for my early stage in .NET, I have not
<DIV></DIV>>understood the hints an tips directed to my issue.
<DIV></DIV>>My code is:
<DIV></DIV>>
<DIV></DIV>><%@ Import Namespace="System.Data.OracleClient" %>
<DIV></DIV>>
<DIV></DIV>>
<SCRIPT language=VB Debug="true" runat="server">
</DIV>>
</DIV>> Sub Page_Load(Sender As Object, E As EventArgs)
</DIV>>
</DIV>> Dim con As New OracleConnection("SERVER=aspnet;USER ID=system;PWD=manager")
</DIV>> Dim cmd As New OracleCommand
</DIV>>
</DIV>> con.Open()
</DIV>> cmd = New OracleCommand("select * from categories;",con)
</DIV>>
</DIV>> DataGrid1.DataSource = cmd.ExecuteReader()
</DIV>> DataGrid1.DataBind()
</DIV>>
</DIV>> End Sub
</DIV>>
</DIV>></SCRIPT>

<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>><?xml:namespace prefix = asp /><asp:DataGrid id=DataGrid1 runat="server"></asp:DataGrid>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>And I get this error:
<DIV></DIV>>
<DIV></DIV>>Compiler Error Message: BC30002: Type 'OracleConnection' is not defined.
<DIV></DIV>>
<DIV></DIV>>Source Error:
<DIV></DIV>>
<DIV></DIV>>Line 5: Sub Page_Load(Sender As Object, E As EventArgs)
<DIV></DIV>>Line 6:
<DIV></DIV>>Line 7: Dim con As New OracleConnection("SERVER=aspnet;USER
<DIV></DIV>>ID=system;PWD=manager")
<DIV></DIV>>Line 8: Dim cmd As New OracleCommand
<DIV></DIV>>Line 9:
<DIV></DIV>>
<DIV></DIV>>The Oracle Client has been installed and tested!
<DIV></DIV>>The ODP.NET has also been installed and updated.
<DIV></DIV>>
<DIV></DIV>>Thanks,
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>| [ngfx-oracle] member Click here to reveal e-mail address = YOUR ID
<DIV></DIV>>| http://www.aspfriends.com/aspfriends/ngfx-oracle.asp = JOIN/QUIT
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://g.msn.com/1HM503401/37'>http://explorer.msn.com</a>.<br></html>

Reply to this message...
 
 
System.Data.OracleClient.OracleCommand
System.Data.OracleClient.OracleConnection
System.EventArgs
System.Web.UI.WebControls.DataGrid
System.Windows.Forms.DataGrid




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification