By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,468 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,468 IT Pros & Developers. It's quick & easy.

I know a little~~~~~~~~~:)

P: n/a
first,install java and jdbc on your machine;
you'd better install SQL 2000 on your;and my OP is Windows 2000
advanced server,which surport SQL 2000 Server;For this,I give up
and Win98;
then,Install a driver on your machine.
and I use jdbc-odbc
now you can program java application;Java applet is a little
it's usual forbidden to do this,but you can change this.
now I list my code:
import java.sql.*;

public class Test002 extends {
public Connection con;
public Statement st;
public ResultSet result;
public void init()throws Exception{


this.con=DriverManager.getConnection("jdbc:odbc:JD BC-ODBC");//取得数据源并进行连接;

public void paint()throws Exception{"SELECT * FROM authors");

System.out.print(this.result.getString(1)+" "+'\t');

System.out.print(this.result.getString(2)+" "+'\t');

System.out.print(this.result.getString(3)+" "+'\t');



public static void main(String[] args) throws Exception{
Test002 test = new Test002();


Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.