decimal 关键字表示 128 位数据类型。同浮点型相比,decimal 类型具有更高的精度和更小的范围,这使它适合于财务和货币计算。decimal 类型的大致范围和精度如下表所示。
大致范围 ±1.0 × 10-28 到 ±7.9 × 1028
精度 28 到 29 位有效位
.NET Framework 类型 System.Decimal
decimal 关键字表示 128 位数据类型。同浮点型相比,decimal 类型具有更高的精度和更小的范围,这使它适合于财务和货币计算。decimal 类型的大致范围和精度如下表所示。
大致范围 ±1.0 × 10-28 到 ±7.9 × 1028
精度 28 到 29 位有效位
.NET Framework 类型 System.Decimal
VS2010下最好用的帮助文档查看器,有索引功能,尤其是习惯VS2008MSDN的朋友,一定不要错过。
还没有安装H3Viewer,赶快下载吧;安装过了,是最新版吗,不是,快来更新吧。
嘿嘿,不好意思,名字写的是中文版,其实是多国语言版(当然含中文),官方只有这一个版本,这是翻墙到官网下载的最新的。H3Viewer_Setup_1.9.0.87.rar
declare
job9 number;
begin
dbms_job.submit(job9,'agnygl.pro9;',trunc(last_day(sysdate), 'dd'),'trunc(last_day(add_months(sysdate,1))) ');
commit;
end;
create or replace procedure pro9 as first_count number(1, 0); ccjdbh varchar2(11); CURSOR cur_cjdbh IS select cjdbh from b_index; begin insert into tnnew/*临时表,用于存放初步查询结果*/ (select cjdbh, yg, cjsj from t_mid where cjdbh in (select cjdbh from b_index) and cjsj between trunc(last_day(sysdate), 'dd') - 1 and trunc(last_day(sysdate), 'dd') - 1 + 1 / 24); begin open cur_cjdbh; loop fetch cur_cjdbh into ccjdbh; exit when cur_cjdbh%notfound; select count(*) into first_count from tnnew where cjdbh = '' || ccjdbh; if first_count = 0 then update nnew n set n.cjdbh = ''||ccjdbh, n.yg = 0;/*结果表,用于存放最终查询结果*/ commit; else update nnew set (cjdbh, YG,cjsj) = (select cjdbh, YG ,cjsj from tnnew where cjsj = (select min(cjsj) from tnnew where cjdbh = ''||ccjdbh) and cjdbh = ''||ccjdbh); commit; end if; end loop; close cur_cjdbh; end; end;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
//步骤一:通讯初始化,调用ComInitial、NetInitial或ModemInitial;
//步骤二:控制卡特性设置,调用SetLEDProperty;
//步骤三:数据收发,调用数据收发函数;
//步骤四:关闭通讯,调用Close。
namespace LedDemo
{
public partial class LedForm : Form
{
public LedForm()
{
InitializeComponent();
}
//串口初始化
[DllImport("CL2005_API_StdCall.dll")]
public static extern bool CL2005_ComInitial(short ComPort, long BaudRate, short WaitTime);
//设置主控卡
[DllImport("CL2005_API_StdCall.dll")]
public static extern bool CL2005_SetLEDProperty(short CardType, short CardNum, short Width, short Height, short Color, short LockHZLibFlag);
//转换显示区
[DllImport("CL2005_API_StdCall.dll")]
public static extern bool CL2005_SwitchToBank(int bank);
[DllImport("CL2005_API_StdCall.dll")]
public static extern bool CL2005_ClearBank(int bank);
//显示字符串
[DllImport("CL2005_API_StdCall.dll")]
public static extern bool CL2005_ShowString(short bank, short XPos, short YPos, short Color, string lpString);//最后一个参数类型原本是long,我自行修改成了string,是造成不显示的原因吗?
//关闭串口
[DllImport("CL2005_API_StdCall.dll")]
public static extern void CL2005_ComClose();
//发送汉字的时候需要加载字库吗?
private void ShowLed_Click(object sender, EventArgs e)
{
Led("车:鲁A12345重:1000KG皮");
}
public bool Led(string strShow)
{
if (CL2005_ComInitial(5, 38400, 1000))
{
if (CL2005_SetLEDProperty(2, 0, 96, 32, 0, 1))
{
if (CL2005_SwitchToBank(0))
{
CL2005_ClearBank(0);
if (CL2005_ShowString(1, 0, 0, 1, strShow))
{
bool isOK = CL2005_SwitchToBank(1);
CL2005_ComClose();
if (isOK)
{
MessageBox.Show("显示成功");
}
else
{
MessageBox.Show("显示失败");
}
}
}
}
return true;
}
else
{
MessageBox.Show("LED串口初始化错误!");
return false;
}
}
}
}
leddemo.rar