Redian新闻
>
JDBC<======================>Oracle8i
avatar
JDBC<======================>Oracle8i# Database - 数据库
c*g
1
I install oracle8i personal edition and java one
the same machine.
How to set the url?
getConnection ("jdbc:oracle:thin:@"+ database,
------------what should be here? local
machine

"scott", "tiger");
JDBC 新手. Thanks a lot!
avatar
z*h
2
create a table login then try this code:
import java.sql.*;
import java.io.*;
public class JdbcTest
{
public static void main(String args[])
{
//String update = "INSERT INTO login(user_name, password,
user_type) VALUES ('Guest', '143456', 'adminis')";
String query = "SELECT * FROM login";
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String url = "jdbc:odbc:ORACLE";
String username = "scott";
String password = "tiger";
try {
// Load the driver to allow connection to the database
Class.forName(

【在 c****g 的大作中提到】
: I install oracle8i personal edition and java one
: the same machine.
: How to set the url?
: getConnection ("jdbc:oracle:thin:@"+ database,
: ------------what should be here? local
: machine
:
: "scott", "tiger");
: JDBC 新手. Thanks a lot!

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。