How to configure Oracle Database Connections in JBuider2005

xiaoxiao2021-03-06  20

Just contact Java, not familiar with Java's development environment, today is browsing

At http://gceclub.sun.com.cn/ Technical website, I found a tutorial that introduces how to connect the Oracle database. I am very interested. I have just bought Oracle's CDs a few days ago, I have never used it because I used to When developing .NET programs, I often use SQL2000, I feel that something is very small, so I am confident that I develop Java's environment is JBuider 2005, who knows that I will introduce one according to the article. When I added a code in the project, I encountered a difficult problem, that is, I need to use Import Oracle.jdbc.driver. *, The compiler produces an error without Oracle, I know this is missing class It is caused by it, but how can I solve it? First, I found this introduction in the beginning of the article: "After installing the Oracle client locally, after installation, you can find ... / jdbc / lib / classes12 in the installed path. ZIP file, we set the path where classes12.zip in the environment variable classpath. "I thought that ClassPath here was set up environment variables in my computer (Yun Si ~, maybe because I have never used Ide, so After turning such a low-level mistake), when I restarted the computer, I found that the problem was still, so I started to consider whether to configure JBuilder, first search for Oracle in his help, I found a few swimming introductions, one is File | Enterprise | Enterprice Setup, I found that there is an option to configure Database Driver. I am stupid to add Driver by adding Driver, but helpless, I haven't figured out the origin of things in the system, under the limited suggestion of the system. I can't find it, I should add that file, I am confused, I don't know how it is, I have no way. In an attempt, I found that Tools | Database Pilot can add new data servers to this. But I found that Oracle Driver is in the red word state, it is not enabled. What is going on? I will find TPPLS | Configue | Libaries | I need to set up TPPLS | Configue | Libaries | Add a new item called Oracle, then set its class to Oracle's directory /jdbc/lib/classes12.zip, I am in Database, then I add Database Driver in Enterprice Setup in Winterprice, at this time, Things have a eyebrow, and the spirit is one. Le, I am newly built Oracle Database in Database Pilot, I found it normally (ecstatic ~), but I found the original problem after I was started from the new JBuilder, I was mad at me! I found the reason. In the end, I think this problem is most direct. The factor is to say that the problem of the engineering visible libaries, because I check the Project Option, I found that there is PATH in Project Property. At this time, I finally saw the light, and the Required Libaries were successfully added to the REQUIRED LIBARIES. Close, and verified again. ,problem solved

So, the steps to configure Oracle in Builder 2005 are:

1. Add an ORACLE in the user home of Tools | Confirg | Libaries, set it Class to: Oracle's directory /jdbc/lib/classes12.zip

2. Add Oracle.config in Database Driver in Enterprice's Enterprice Setup

3. Add Oracle to the PROIRED LIBARIES in Project | Project Properties

You can use import oracle.driver. *;

转载请注明原文地址:https://www.9cbs.com/read-43890.html

New Post(0)