MS SQL Server
  Home arrow MS SQL Server arrow Page 5 - Using Oracle Developer Tools with Visual S...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

Using Oracle Developer Tools with Visual Studio
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2006-10-11

    Table of Contents:
  • Using Oracle Developer Tools with Visual Studio
  • Accessing Oracle Explorer
  • Reviewing the Connection Properties
  • The Code Behind Form1
  • Displaying Data from the Employees Table

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Oracle Developer Tools with Visual Studio - Displaying Data from the Employees Table


    (Page 5 of 5 )

    Add a form Data.vb to the same project, and drag and drop the Employees table from the Oracle Explorer to the data form. This adds the employeesOracleDataAdapter1 icon followed by the same previous message. When you click Yes to this message the employeesOrcleConnection1 will also be added. We will use the Oracle Data Reader object to read the EmployeeID, First Name, and Last Name and display them in the list box. For this purpose add a ListBox and a command button as shown.

    In a manner similar to what was done with Form1, add an imports statement at the top of the data form's code page. To the click event of the button, insert the code shown in the next picture.

    The following sequence of code execution takes place when the command button is clicked: after instantiating a connection it will be assigned the employeesOracleConnection1. The connection  then opens. A new Oracle data adapter gets instantiated. It will be assigned to the employeesOracleDataAdapter1. This adapter's select command will be assigned the SQL statement to get all fields from the Employees table. The OracleDataReader grabs the executed SelectCommand. While the data in the reader is being read, the ListBox gets populated. Before terminating this event, the reader and the connection are both closed. The display shown next appears after you click on the OK button to the message box, which says that the OracleDataReader does have data denoted as True by the Boolean.

    Summary

    Oracle Data Tools add a comprehensive set of tools to the Visual Studio IDE, only a very small subset was explored in this basic tutorial. The ODT gives full support for most of the activities that one can can do on the Oracle Server such as working with stored procedures, making changes to the tables, views, and so forth. Although the ODT are added to several versions of VS 2003, to exploit the full capability of this resource one may require the Professional or Enterprise version of VS 2003. The drag and drop feature adds to the RAD capability immensely. Although in this tutorial code was used to make a connection and display data, the same could be done during design time, reducing the code even more. The password was shown in the display for no good reason, but in a production scenario it is of course serious.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Yes, that is true. It took some time to write the article, but the whole mouse...
     

    MS SQL SERVER ARTICLES

    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services
    - Building a Multi-table Report with SQL 2005 ...
    - A Secure Way of Building Connection Strings
    - Transferring a Database Using the SSIS Desig...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway