请问取SQL SERVER 2000里面的numeric数据类型的字段因该用ResultSet的哪个函数?

yj1804 2003-08-23 04:42:38
还有取DateTime类型的应该用哪个,谢谢了
...全文
32 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ejbcreate 2003-08-23
  • 打赏
  • 举报
回复
getInt()
getTimestamp()
系统需求分析: 在学习了数据库之后,为了更进一步巩固所学知识,将其用于实践,我们选择了银行管 理系统,来完成最基本的一些操作。 功能 (1).客户:包括存款,款,转账,查询余额,查看流水,密码修改这些功能 (2).管理员: 1.新增用户 2 .删除 3.查看 4.员工绩效(就是根据流水表中的员工号,select出员工一天内做的所有单,用 来考评绩效) 5.VIP判别(就是账户存储资金大于某个值的时候在账户表的一个字段上赋值为VIP) 6.资金储备金判别,当库存资金总数小于一个值的时候,系统对管理者要提出风险警告 。 3.功能流程图: 详细设计: 1.E-R图模型 2.根据E-R图设计关系表 (1).银行信息表(bank) "字段名 "字段类型及长度"允许空 "主键 " 说明 " "Bid " nchar(9) " no " PK "银行号 " "Bname " nchar(20) " no " "银行名 " "Bmoney " " no " "银行余额 " " "numeric(20,3) " " " " (2).客户信息表(custom) "字段名 "字段类型及长度"允许空 "主键 " 说明 " "Cid " nchar(9) " no " PK " 客户ID " "Cname " nchar(10) " no " " 客户姓名 " "Cpass " nchar(10) " no " " 密码 " "Ctime " nchar(20) " no " " 注册时间 " "Bid " nchar(9) " no " " 所在银行行号 " " " " " "外码(Bank(Bid)" " " " " ") " "Crmoney" " no " " 账户余额 " " "numeric(10,3) " " " " "Cphone " nchar(11) " no " " 客户电话 " (3).员工(管理员)表(staff) "字段名 "字段类型及长度"允许空 "主键 " 说明 " "Sid " nchar(9) " no " PK " 员工ID " "Sname " nchar(10) " no " " 员工姓名 " "Spass " nchar(10) " no " " 登陆密码 " "SItime " nchar(20) " no " " 入行时间 " "Sphone " nchar(11) " no " " 联系电话 " (4).流水信息表 "字段名 "字段类型及长度 "允许空 "主键 " 说明 " "Oid " nchar(9) " no " PK " 流水号 " "Cid " nchar(9) " no " " 客户ID " " " " " "外码(Custom(Cid)) " "Bid " nchar(9) " no " " 银行ID " " " " " "外码(Bank(Bid)) " "Sid " nchar(9) " no " " 员工ID 外码(Staff(Sid " " " " " ")) " "Otype " smallint " no " " 操作类型 " "Otime " nchar(20) " no " " 操作时间 " "Omoney " " yes " " 交易金额 " " "numeric(10,3) " " " " "OBmoney " " yes " " 上次余额 " " "numeric(10,3) " " " " "OAmoney " " yes " " 账户余额 " " "numeric(10,3) " " " " 三个实体:bank,staff,custom 一个联系:operate 关系图: 程序代码: 客户部分: a. void CClientDlg::OnButtonIn() //存款函数 { // TODO: Add your control notification handler code here CInDlg InDlg; if (InDlg.DoModal()==IDOK) {double temp,temp1; ADOConn ado; CString sql = "select * from Custom where Cname='"+Cname+"'"; _RecordsetPtr ResultSet = ado.GetRecordSet((_bstr_t)sql); CString str = (LPCTSTR)(_bstr_t)ResultSet- >GetCollect("Crmoney"); CString bid = (LPCTSTR)(_bstr_t)ResultSet->GetCollect("Bid"); CString str4 = (LPCT
Excel POI读封装(文件+示范代码) package org.excel.service; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.Field; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; import javax.jws.WebService; import org.apache.poi.hssf.usermodel.*; import org.excel.data.DataType; import org.excel.data.DealForeign; import org.excel.data.ExcelImport; import org.excel.data.impl.StInStatusImpl; import org.excel.data.impl.StuClassImportImpl; import org.excel.data.impl.StuEducationImpl; import org.excel.data.impl.StuImprotDataImpl; import org.excel.data.impl.StuInClassImportImpl; import org.excel.data.impl.StuWorkStatusImpl; import org.excel.manager.Util; import org.excel.model.ExcelMap; import org.excel.xml.ExcelXmlParse; import net.sourceforge.jtds.jdbcx.JtdsDataSource; @WebService public class ExcelServiceImpl implements IExcelService { String tableName = ""; public static Integer suc = 0; public static Integer fail = 0; StringBuilder insert = new StringBuilder( " insert into {tableName} {column} values {values}"); /** 读Excel表格数据 */ public List readExcel(String excelName, Integer sheetIndex, String startPoint, String endPoint) throws Exception { FileInputStream inputStream = null; inputStream = new FileInputStream(excelName); HSSFWorkbook workbook = new HSSFWorkbook(inputStream); HSSFSheet sheet = workbook.getSheetAt(sheetIndex); String[] sc = null;// 开始坐标 String[] ec = null;// 结束坐标 int startRow = 0;// 默认开始行数 int endRoe = sheet.getPhysicalNumberOfRows();// 默认结束行 int startLine = 0;// 默认开始列 int endLine = 0;// 结束列 if (startPoint != null && endPoint != null) { sc = startPoint.

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧