Vous êtes sur la page 1sur 5

1.

How to view all the tables present in the database?

SELECT * FROM tab; // this will work only in Oracle DESCRIBE tab;

Name

Null?

Type

TNAME

NOT NULL

VARCHAR2(30)

TABTYPE

VARCHAR2(7)

CLUSTERID

NUMBER

You can retrieve particular tables list using SELECT * FROM tab WHERE tname LIKE ‘%emp%’; SELECT * FROM tab WHERE tabtype IN(‘table’, ‘view’);

2

  • 3. .NET Managed Provider for Oracle from Microsoft

  • 4. Oracle Data Provider for .NET (ODP.NET) from Oracle

You can use OleDb as follows

using System.Data.OleDb; OleDbConnection oracleConn = new OleDbConnection(); oracleConn.ConnectionString = "Provider=\"OraOLEDB.Oracle.1\"; User ID=scott;Password=tiger; Data Source=yourSource; Extended Properties=""; Persist Security Info=False"; oracleConn.Open(); ..

  • 6. Install IIS and verify that it is installed and

working properly

Navigate to Start | Settings | Control Panel | Add/Remove Programs | Add/Remove Windows Components and see whether IIS is checked, as seen in the following picture.

2 3. .NET Managed Provider for Oracle from Microsoft 4. Oracle Data Provider for .NET (ODP.NET)

3

If IIS is unchecked, check it and then click Next to install it. You will need the original Windows installation CD to finish the installation. A quick way to test the installation of IIS is to type in and enter http://localhost on Internet Explorer. If IIS is installed and running properly, you will get a valid Web page without any errors.

Another quick way of checking is: Select Start | Run and type in Inetmgr and press Enter. The Internet Information Services configuration window will appear. If windows gives an error saying Inetmgr then install IIS using above procedure.

For more details follow the link

7. Create a new Oracle Service Name

Follow these steps:

Select Start | Programs | Oracle - OraHome 92 | Configuration and Migration Tools | Net Manager.

On the Oracle Net Manager window that appears, successively expand Oracle Net

Configuration | Local | Service Naming nodes. Select the Service Naming node and then press the green + icon on the left panel (see the picture below) to add a new Service Name. Follow the wizard and enter the information pertaining to your Oracle database.

4

4 8.The type or namespace name 'OracleClient' does not exist in the namespace 'System.Data' (are you

8.The type or namespace name 'OracleClient' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

You need to edit the config file to include the assembly - System.Data.OracleClient. Follow the below steps to resolve this error. If you are using .NET 1.0

  • 1. Edit C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG\machine.config

  • 2. Under <assemblies> add the below entry

<add assembly="System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >

If you are using .NET 1.1

  • 1. Edit C:\WINNT\Microsoft.NET\Framework\v1.0.3705\CONFIG\machine.config

  • 2. Under <assemblies> add the below entry

<add assembly="System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" >

5

If you are using .NET 2.0 1. Edit C:\WINNT\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config 2. Under <assemblies> add the below entry <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >

OR

if you are using the Visual Studio IDE, then you can right-click on your project in the "

"Solution Explorer" tool window and choose "Add Reference

From there, you

... need to add a reference to System.Data.OracleClient.dll. If you are doing it on the command line, then use the /reference parameter of csc (type "csc /?" for brief syntax help). The full path to that assembly on my system is:

c:\windows\microsoft.net\framework\v1.1.4322\System.Data.OracleClient.dll