by Nikolay Krasilnikov
Published July 2012 (updated June 2016)Creating a Database Project
In the Oracle Developer Studio IDE, you can create a project for an Oracle Database application. Oracle Developer Studio added support for Pro*C/C++. And the Oracle Developer Studio release includes Oracle Instant Client, which contains native client libraries for communicating with databases, as a component that you can optionally install.
The New Project wizard in the IDE includes a new project type for Oracle Database applications. To create an Oracle Database project, do the following:
Figure 1. Choose Project Page of the New Project Wizard
Note: Make sure the tool collection is Oracle Developer Studio so that the IDE has access to the Oracle Instant Client in your Oracle Developer Studio installation. If you used a different tool collection, you have to manually provide paths to the Pro*C precompiler, include files, and libraries to the project makefile.
Figure 2. Project Name and Location Page of New Project Wizard
Figure 3. Master Table Page of New Project Wizard
Note: The wizard contains default values for Oracle Database, Express Edition. Change them if necessary.
Figure 4. Customize Connection Page of New Connection Wizard
Figure 5. Choose Database Schema Page of New Connection Wizard
Figure 6. Master Table Page of New Project Wizard
Figure 7. Output Window Showing Run Tab for the New Project
The Source Editor support for Pro*C/C++ in the IDE includes coloring, code completion, and hyperlinks for Pro*C/C++ statements.
To provide code completion for database elements, the IDE uses the same database connection you established for the project when you created it. You can change the database connection used for code completion in the Services window or by clicking the Select Database Connection button in the Source Editor toolbar when you have a source file in your project open.
Figure 8. Select Database Connection Button in Source Editor Toolbar
Code completion is provided for the following:
Figure 9. Code in Source Editor Showing SQL Keyword Completion
Figure 10. Code in Source Editor Showing Database Table Column Completion
Figure 11. Code in Source Editor Showing Variable Name Completion
Figure 12. Code in Source Editor Showing Table Name Completion
See the following resources for more information:
ojdbc6.jarfile, as mentioned in the article, because it is already included in the Oracle Developer Studio IDE.
Nikolay Krasilnikov joined Sun Microsystems in 2008. Now he is a senior software engineer for Oracle in St. Petersburg, Russia developing the Oracle Developer Studio IDE. His responsibilities include developing the C and C++ grammar, parser, and code model.
|Revision 1.1, June 2016|
|Revision 1.0, July 2012|