本站所有文章及代码如无特别说明均为本站原创,如果您需要转载,需本人同意!
我坚持一日三思,所以我的blog每天都会更新,除非我无法上网!(^_^)
我的联系方式:
QQ:363978818 Msn/mail:yonghe169@163.com
我坚持一日三思,所以我的blog每天都会更新,除非我无法上网!(^_^)
我的联系方式:
QQ:363978818 Msn/mail:yonghe169@163.com
每月5号执行的Oracle Job
[
2009/06/15 20:41 | by fubin ]
2009/06/15 20:41 | by fubin ]
begin
sys.dbms_job.submit(job => :job,
what => 'Fin_Sys_Create_Job;',
next_date => to_date('05-07-2009', 'dd-mm-yyyy'),
interval => 'trunc(add_months(sysdate,1),''mm'')+4');
commit;
end;
/
sys.dbms_job.submit(job => :job,
what => 'Fin_Sys_Create_Job;',
next_date => to_date('05-07-2009', 'dd-mm-yyyy'),
interval => 'trunc(add_months(sysdate,1),''mm'')+4');
commit;
end;
/
使用Java发送接收邮件
[
2009/06/08 23:19 | by fubin ]
2009/06/08 23:19 | by fubin ]
非常简单的JTable使用MDB数据库实例(Swing)
[
2009/06/03 23:02 | by fubin ]
2009/06/03 23:02 | by fubin ]
下载文件
《让我们荡起双浆》那是我美丽的童年。。。远去的时光!
将某个表的某个字段的外键全部导出到一个文件
[
2009/05/25 07:13 | by fubin ]
2009/05/25 07:13 | by fubin ]
accept column_name prompt "Enter a column name : "
accept table_name prompt "Enter the column's table name : "
prompt
prompt working...
set termout off
spool ffkr.txt
select chr(10) || 'Foreign key references for column '
|| upper ('&column_name')
|| ', table '
|| upper ('&table_name')
|| ' (owner '
|| user
|| ') :'
from dual
/
declare
h_count number;
begin
select count(*)
into h_count
from user_tab_columns
where column_name = upper ('&column_name')
and table_name = upper ('&table_name');
if h_count = 0 then
dbms_output.put_line ('=====================================');
dbms_output.put_line ('>>> COLUMN / TABLE DOES NOT EXIST <<<');
dbms_output.put_line ('=====================================');
dbms_output.put_line (chr(10));
end if;
end;
/
select 'table_name ------ ' || ucc.table_name || chr(10) ||
'constraint_name - ' || uc.constraint_name || chr(10) ||
'column_name ----- ' || ucc.column_name || chr(10) ||
'status ---------- ' || uc.status
from user_constraints uc,
user_cons_columns ucc,
user_cons_columns ucc2
where ucc2.table_name = upper ('&table_name')
and ucc2.column_name = upper ('&column_name')
and uc.constraint_type = 'R'
and uc.constraint_name = ucc.constraint_name
and uc.r_constraint_name = ucc2.constraint_name
and ucc.position = ucc2.position
order by ucc.table_name,
uc.constraint_name,
ucc.position
/
spool off
set heading on
set pagesize 24
set verify on
set feedback 6
set termout on
prompt
pause Done... Press ENTER to view results
edit ffkr.txt
accept table_name prompt "Enter the column's table name : "
prompt
prompt working...
set termout off
spool ffkr.txt
select chr(10) || 'Foreign key references for column '
|| upper ('&column_name')
|| ', table '
|| upper ('&table_name')
|| ' (owner '
|| user
|| ') :'
from dual
/
declare
h_count number;
begin
select count(*)
into h_count
from user_tab_columns
where column_name = upper ('&column_name')
and table_name = upper ('&table_name');
if h_count = 0 then
dbms_output.put_line ('=====================================');
dbms_output.put_line ('>>> COLUMN / TABLE DOES NOT EXIST <<<');
dbms_output.put_line ('=====================================');
dbms_output.put_line (chr(10));
end if;
end;
/
select 'table_name ------ ' || ucc.table_name || chr(10) ||
'constraint_name - ' || uc.constraint_name || chr(10) ||
'column_name ----- ' || ucc.column_name || chr(10) ||
'status ---------- ' || uc.status
from user_constraints uc,
user_cons_columns ucc,
user_cons_columns ucc2
where ucc2.table_name = upper ('&table_name')
and ucc2.column_name = upper ('&column_name')
and uc.constraint_type = 'R'
and uc.constraint_name = ucc.constraint_name
and uc.r_constraint_name = ucc2.constraint_name
and ucc.position = ucc2.position
order by ucc.table_name,
uc.constraint_name,
ucc.position
/
spool off
set heading on
set pagesize 24
set verify on
set feedback 6
set termout on
prompt
pause Done... Press ENTER to view results
edit ffkr.txt
加载驱动的方法,修改地址以后可以加载任意驱动
[
2009/05/24 07:21 | by fubin ]
2009/05/24 07:21 | by fubin ]
;TASM_DOS_EXE
.model tiny
.stack 64
.code
_start:
mov ah,9 ; \
mov dx,(offset caption+100h) ; put caption on the screen
int 21h ; /
xor di,di ; es:di = 0 on entry
mov es,di ;
mov ax,1684h ; function number
mov bx,0027h ; VXDLDR_DEVICE_ID
int 2Fh ; get pmode API address
mov ax,es ; if es:di = 0, VXDLDR was
or ax,di ; not loaded
mov cx,-1 ; cx = FFFF for string ops
jmp $+6 ; skip next dword
dd 0 ; LE header offset put by link
jz vxdldr_not_there ;
mov word ptr [_VXDLDRCallAddr+100h],di ; es:di = ptr pmode API
mov word ptr [_VXDLDRCallAddr+100h+2],es ;
mov es,ds:[2Ch] ; assembles to: mov es,[2Ch]
xor di,di ;
xor al,al ;
@@: repne scasb ; \
scasb ; \
jnz @@ ; search for executable name
inc di ; and put its offset on stack
inc di ; /
push di ; /
repne scasb ; goto end of the name
std ; now search backwards...
mov al,'.' ; ...for the dot before file
repne scasb ; extension...
inc di ;
mov byte ptr es:[di],0 ; ...and replace it with zero
push di ; save offset of dot
mov al,'\' ; lets find '\'
repne scasb ;
; dx = ofs to null terminated
lea dx,[di+2] ; filename without extension
mov ax,2 ; ax = 2 (Unload driver)
mov bx,-1 ; bx = -1 --> ds:dx = drv name
push es ;
pop ds ;
db 09Ah ; call PTR16:PTR16
_VXDLDRCallAddr dd 0 ;
pop di ; restore offset of dot
pop dx ; restore name offset
jnc unloaded ;
mov ax,1 ; ax = 1 (Load driver)
mov byte ptr [di],'.' ; restore extension dot
call dword ptr cs:[_VXDLDRCallAddr] ; call VXDLOADER
jnc loaded ;
vxdldr_not_there:
mov dx,(offset error)
jmp exit
loaded:
mov dx,(offset load_msg)
jmp exit
unloaded:
mov dx,(offset unload_msg)
exit:
push cs
pop ds
mov ah,9
int 21h
mov dx,(offset btm_line)
int 21h
mov ax,4C00h
int 21h
caption db 13,10,"///////////////////////////////////////"
db 13,10,"? VxD Stub-Loader v1.00.1023. ?
db 13,10,"? (c) 2000 by fubin. www.cujava.com ?
db 13,10,"///////////////////////////////////////",'$'
error db 13,10,"? Error: Could not load driver. ?,'$'
load_msg db 13,10,"? Driver successfully loaded. ?,'$'
unload_msg db 13,10,"? Driver successfully unloaded. ?,'$'
btm_line db 13,10,"///////////////////////////////////////",13,10,'$'
end _start
.model tiny
.stack 64
.code
_start:
mov ah,9 ; \
mov dx,(offset caption+100h) ; put caption on the screen
int 21h ; /
xor di,di ; es:di = 0 on entry
mov es,di ;
mov ax,1684h ; function number
mov bx,0027h ; VXDLDR_DEVICE_ID
int 2Fh ; get pmode API address
mov ax,es ; if es:di = 0, VXDLDR was
or ax,di ; not loaded
mov cx,-1 ; cx = FFFF for string ops
jmp $+6 ; skip next dword
dd 0 ; LE header offset put by link
jz vxdldr_not_there ;
mov word ptr [_VXDLDRCallAddr+100h],di ; es:di = ptr pmode API
mov word ptr [_VXDLDRCallAddr+100h+2],es ;
mov es,ds:[2Ch] ; assembles to: mov es,[2Ch]
xor di,di ;
xor al,al ;
@@: repne scasb ; \
scasb ; \
jnz @@ ; search for executable name
inc di ; and put its offset on stack
inc di ; /
push di ; /
repne scasb ; goto end of the name
std ; now search backwards...
mov al,'.' ; ...for the dot before file
repne scasb ; extension...
inc di ;
mov byte ptr es:[di],0 ; ...and replace it with zero
push di ; save offset of dot
mov al,'\' ; lets find '\'
repne scasb ;
; dx = ofs to null terminated
lea dx,[di+2] ; filename without extension
mov ax,2 ; ax = 2 (Unload driver)
mov bx,-1 ; bx = -1 --> ds:dx = drv name
push es ;
pop ds ;
db 09Ah ; call PTR16:PTR16
_VXDLDRCallAddr dd 0 ;
pop di ; restore offset of dot
pop dx ; restore name offset
jnc unloaded ;
mov ax,1 ; ax = 1 (Load driver)
mov byte ptr [di],'.' ; restore extension dot
call dword ptr cs:[_VXDLDRCallAddr] ; call VXDLOADER
jnc loaded ;
vxdldr_not_there:
mov dx,(offset error)
jmp exit
loaded:
mov dx,(offset load_msg)
jmp exit
unloaded:
mov dx,(offset unload_msg)
exit:
push cs
pop ds
mov ah,9
int 21h
mov dx,(offset btm_line)
int 21h
mov ax,4C00h
int 21h
caption db 13,10,"///////////////////////////////////////"
db 13,10,"? VxD Stub-Loader v1.00.1023. ?
db 13,10,"? (c) 2000 by fubin. www.cujava.com ?
db 13,10,"///////////////////////////////////////",'$'
error db 13,10,"? Error: Could not load driver. ?,'$'
load_msg db 13,10,"? Driver successfully loaded. ?,'$'
unload_msg db 13,10,"? Driver successfully unloaded. ?,'$'
btm_line db 13,10,"///////////////////////////////////////",13,10,'$'
end _start
格式化数字(例如产生财务记数格式)
[
2009/05/15 07:26 | by fubin ]
2009/05/15 07:26 | by fubin ]





