摘要: 1,Application 常用属性(ActivateWorkbook,ActiveWorksheet,ActiveCell,DisplayAlerts,StatusBar,DisplayStatusBar,DisplayScrollBar,UserName,Dialogs) Application.Dialogs(xlDialogOpen).Show 常用方法(Quit,Calculate,FindFile,OnTime)2,Workbooks对象 常用属性(Count,Item,Open,Close) Workbooks("工作簿5").Activate Workboo 阅读全文
posted @ 2012-03-23 23:45 蕭慶蘋 阅读(263) 评论(0) 推荐(0) 编辑
摘要: String driver="com.mysql.jdbc.Driver"; String url="jdbc:mysql://localhost:3306/test"; try { Class.forName(driver); Connection conn=DriverManager.getConnection(url,"root","3.14"); PreparedStatement pstmt=conn.prepareStatement("select * from person"); 阅读全文
posted @ 2012-03-23 23:41 蕭慶蘋 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1、首先导入JDBC驱动。2、更改context.xml文件<?xml version='1.0' encoding='utf-8'?><Context reloadable="true"> <WatchedResource>WEB-INF/web.xml</WatchedResource> <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource&qu 阅读全文
posted @ 2012-03-23 23:40 蕭慶蘋 阅读(152) 评论(0) 推荐(0) 编辑
摘要: package com.fy.utils;import java.sql.SQLException;import javax.naming.Context;import javax.naming.InitialContext;import javax.naming.NamingException;import javax.sql.DataSource;import org.apache.commons.dbutils.QueryRunner;import org.apache.commons.dbutils.ResultSetHandler;public class MySQLUtil { p 阅读全文
posted @ 2012-03-23 23:31 蕭慶蘋 阅读(672) 评论(0) 推荐(0) 编辑
摘要: 這只是個人一的一個習慣寫法,並不是一定之規。com.fy.chat 放實休類com.fy.chat.dao 放DAO接口com.fy.chat.dao.jdbc 放DAO接口的mysql的實現com.fy.utils 放一些工具包 阅读全文
posted @ 2012-03-23 23:28 蕭慶蘋 阅读(437) 评论(0) 推荐(0) 编辑
摘要: 1 Dim myconnect As ADODB.Connection 2 Dim myres As ADODB.Recordset 3 Dim n As Integer, m As Integer 4 5 6 Private Sub btn_exit_Click() 7 End 8 End Sub 9 10 Private Sub CommandButton1_Click()11 If myres.BOF = True And myres.EOF = True Then12 Exit Sub13 Else14 n = 115 ... 阅读全文
posted @ 2012-03-23 23:24 蕭慶蘋 阅读(1535) 评论(0) 推荐(0) 编辑
摘要: http://book.51cto.com/art/200909/153501.htm首先将jsvalidation-framework.js和validation-config.xml复制到网站的某一目录下,例如/javascripts。 打开jsvalidation-framework.js,找到var ValidationRoot = ""; 将这行代码更改为var ValidationRoot = "/javascripts/"; (就是validation-config.xml文件的位置)。 在你需要进行校验的页面中,加入jsvalidatio 阅读全文
posted @ 2012-03-23 23:19 蕭慶蘋 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1 Private Sub cmdAdd_Click() 2 res = MsgBox("确定要添加这条记录吗?", vbYesNo + vbQuestion, "添加记录") 3 If res = vbYes Then 4 myres.AddNew 5 myres.Fields("1") = TextBox11.Value 6 myres.Fields("2") = TextBox22.Value 7 myres.Fields("3") = TextBox33.Value 8 myres.Fi 阅读全文
posted @ 2012-03-23 23:15 蕭慶蘋 阅读(371) 评论(0) 推荐(0) 编辑