473,609 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Winxp
and Win98;
then,Install a driver on your machine.
and I use jdbc-odbc
now you can program java application;Jav a applet is a little
difficult,becau se
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{

Class.forName(" sun.jdbc.odbc.J dbcOdbcDriver") ;//加载驱动程序

this.con=Driver Manager.getConn ection("jdbc:od bc:JDBC-ODBC");//取得数据源并进行连 接

this.st=this.co n.createStateme nt();

}
public void paint()throws Exception{
this.result=thi s.st.executeQue ry("SELECT * FROM authors");
while(this.resu lt.next()){

System.out.prin t(this.result.g etString(1)+" "+'\t');

System.out.prin t(this.result.g etString(2)+" "+'\t');

System.out.prin t(this.result.g etString(3)+" "+'\t');

System.out.prin tln();}

}

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

test.init();
test.paint();
test.con.close( );
}

}
Jul 17 '05 #1
0 1715

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2990
by: Tongu? Yumruk | last post by:
I have a little proposal about type checking in python. I'll be glad if you read and comment on it. Sorry for my bad english (I'm not a native English speaker) A Little Stricter Typing in Python - A Proposal As we all know, one of the best things about python and other scripting languages is dynamic typing (yes I know it has advantages and disadvantages but I will not discuss them now). Dynamic typing allows us to change types of...
2
29006
by: hicham | last post by:
Hi, I am looking for help, i would like to know how can i use the endian.h and config.h to convert compiled files under solaris from BIG-ENDIAN to compiled files LITTLE-ENDIAN. I am working under linux debian 3.0 woody Thank you for your help.
5
2316
by: Michele | last post by:
What does the CIO need to know about Sequel Server administration?
72
4808
by: The Plankmeister | last post by:
Is doing this bad: <h3>Some title or other...<a href="#pagetop">back to top</a></h3> I have a feeling it is... My problem is I'm using CSS to style the H3 into a block that spans the whole containing element. I would like the <a> to appear next to the title, but I'm sure this is bad practice (for screen readers and heading-level navigation etc etc) So... is it acceptable to do this:
18
3965
by: Philipp Lenssen | last post by:
I want to write a third installment of "Little Known HTML Facts"*. I would appreciate your input here. For one thing, I would like to remember what exactly those proprietary icons were you could use -- I believe something like "&happyface;" would display a happy face, and so on, for folders, disk drives, and other technical icons. I found something called "&folder;" and "&audio;" (straight from the horse's mouth, at the W3C) but can't...
38
3305
by: Martin Marcher | last post by:
Hi, I've read several questions and often the answer was 'C knows nothing about .' So if C knows that little as some people say, what are the benefits, I mean do other languages know more or is it a benefit that C knows nearly nothing (what I can think about is that C is the largest common divisor defined on most available platforms)?
8
27452
by: Perception | last post by:
Hello all, If I have a C-like data structure such that struct Data { int a; //16-bit value char; //3 ASCII characters int b; //32-bit value int c; //24-bit value }
2
1968
by: petermichaux | last post by:
Hi, It seems like determining element position in a web page is a difficult task. In the position reporting source code I've looked at there are special fixes for at least some versions of Safari and Opera. I am doing a lot of dragdrop experimentation and in some situations need a position reporting function. The function doesn't need to report the positions of exotic elements like images in button elements; however, I would like a...
102
5048
by: BoogieWithStu22 | last post by:
I am running into a problem with a web page I have created when viewing it in IE6 on some machines. The page has a database lookup. The user enters an account name or number and clicks a lookup button. This hits an AS400 database looks for matches and returns a dataset that is used to populate a datagrid. The user then selects one of the entries from the list, this entry is used to populate a couple of textboxes on the page and a couple...
0
974
by: Just_a_fan | last post by:
I am so happy about this I had to tell someone and since no one at the house even knows how to spell VB, I just had to make a short post. I finally got my little program to correctly do a second thread for the daily FTP upload. Not doing so was locking up the UI and causing it to go white-screen. It is also not taking more than 60 seconds and the timer was popping (yes, I know it is stoppable). AND, I had to update a status (label)...
0
8109
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8188
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4002
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4059
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2502
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1630
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.