当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 简单地说,JDBC可做三件事: 1.与数据库建立连接 2.发送SQL语句 3.处理结果。
 

 

 ·rootkit 综述    »显示摘要«
    摘要:在网络安全中经常会遇到rootkit,nsa安全和入侵检测术语字典( nsa glossary of terms used in security and intrusion detection)对rootkit的定义如下:a hacker security tool that captures passwords and message traffic to and from a compute......
 ·用c#快速往excel写数据    »显示摘要«
    摘要:本示例是用于将listview中的内容倒入到excel 与常用的逐单元格写不同的是,本例子采用数据写入到range的方法。该方法效率明显较高 excel.application app = new excel.applicationclass(); if( app == null) { messagebox.show("excel无法启动"); return; } app.......


JDBC的用途

简单地说,jdbc可做三件事:

2.发送sql语句 【程序编程相关:《MVC模式、类封装还是黑客代码》

1.与数据库建立连接 【推荐阅读:【转载】0day软件标题中的含义

以下的代码段给出了以上三步的基本示例: 【扩展信息:UTF-8

3.处理结果.

//建立数据库连接

connection con=drivermanager.getconnection(”jdbc:odbc:wombat”,”login”,”password”);

//创建statement对象

statement stmt=con.createstatement();

//执行sql语句,并返回结果

resultset rs=stmt.executequery(”select a,b,c from table”);

while(rs.next()){

int x=rs.getint(“a“);

string s=rs.getstring(“b“);

float f=rs.getfloat(”c”);

}


    摘要:找到许久以前打印下来的一个图,说的是mvc架构的相互关系,看看觉得有些用处,所以就抄下来了。如果你英文不好,就别看了,肯定你也用不到。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE