當前位置:首頁 » 存儲配置 » 數據存儲程序

數據存儲程序

發布時間: 2022-11-08 08:38:22

❶ 內存數據存儲程序設計 (微機原理課程設計)

data segment
msg1 db 'Please enter the filename to save:$'
msg2 db 'Creating success!',10,13,'$'
msg3 db 'Creation failed!',10,13,'$'
msg4 db 'The disk has been full!',10,13,'$'
msg5 db 'Write success!',10,13,'$'
msg6 db 'write failed!',10,13,'$'
msg7 db 'open failed!',10,13,'$'
msg8 db 'read failed!',10,13,'$'
msg9 db 'the result read from file is:',10,13,'$'
coun dw 0
handle dw ?
nam db 20,?,20 p (?)
read db 200 p(?)
data ends
stack segment
db 200 p (?)
stack ends
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax,data
mov ds,ax
mov ah,9
lea dx,msg1
int 21h
mov ah,10
lea dx,nam
int 21h
mov al,byte ptr[nam+1]
xor ah,ah
lea bx,[nam+2]
add bx,ax
mov [bx],0
mov [nam+1],'\'
call crfile
call wrfile
call refile
mov ah,4ch
int 21h

crfile proc
push ax
push bx
push cx
push dx
push di
push si
lea dx,[nam+1]
mov cx,0
mov ah,3ch
int 21h
jc error
mov handle,ax
call enter1
lea dx,msg2
mov ah,09
int 21h
mov bx,handle
mov ah,3eh
int 21h
jmp exit
error:
call enter1
lea dx,msg3
mov ah,9
int 21h
exit:
pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
crfile endp

wrfile proc
push ax
push bx
push cx
push dx
push di
push si

lea dx,[nam+1]
mov al,01;以寫方式
mov ah,3dh
int 21h
jc error1
mov handle,ax
mov bx,ax
push ds
mov ax,0b02h
mov ds,ax
mov dx,0
mov di,dx
again1:
cmp byte ptr[di],1Ah;ctrl+z
je out1
inc di
jmp again1
out1:
mov cx,di
mov ah,40h
int 21h
pop ds
jc werror
cmp ax,cx
je pass1
lea dx,msg4
mov ah,9
int 21h
jmp pass
pass1:
mov coun,ax
lea dx,msg5
mov ah,9
int 21h
pass:mov bx,handle
mov ah,3eh
int 21h
jmp exit1
error1:
lea dx,msg7
mov ah,09h
int 21h
jmp exit1
werror:
lea dx,msg6
mov ah,09h
int 21h
exit1:

pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
wrfile endp

refile proc
push ax
push bx
push cx
push dx
push di
push si

lea dx,[nam+1]
mov al,0;以讀方式
mov ah,3dh
int 21h
jc error2
mov handle,ax
mov bx,handle
lea dx,read
mov cx,coun
mov ah,3fh
int 21h
jc error3
lea si,read
add si,ax
mov byte ptr[si],'$'
lea dx,msg9
mov ah,9
int 21h
lea dx,read
mov ah,9
int 21h
mov bx,handle
mov ah,3eh
int 21h
jmp exit2
error2:
lea dx,msg7
mov ah,09h
int 21h
jmp exit2
error3:lea dx,msg8
mov ah,9
int 21h
jmp exit2
exit2:
pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
refile endp
enter1 proc
push ax
push dx
mov ah,2
mov dl,10
int 21h
mov dl,13
int 21h
pop dx
pop ax
ret
enter1 endp

code ends
end start

❷ 什麼是資料庫存儲過程

存儲過程(Stored Procere)是在大型資料庫系統中,一組為了完成特定功能的SQL 語句集,它存儲在資料庫中,一次編譯後永久有效,用戶通過指定存儲過程的名字並給出參數(如果該存儲過程帶有參數)來執行它。存儲過程是資料庫中的一個重要對象。在數據量特別龐大的情況下利用存儲過程能達到倍速的效率提升。

這類語言主要提供以下功能,讓用戶可以設計出符合應用需求的程序:

1、變數說明

2、ANSI(美國國家標准化組織)兼容的SQL命令(如Select,Update….)

3、一般流程式控制制命令(if…else…、while….)

4、內部函數

(2)數據存儲程序擴展閱讀:

種類

1、系統存儲過程

2、本地存儲過程

3、臨時存儲過程

4、遠程存儲過程

5、擴展存儲過程

熱點內容
c41演算法 發布:2025-07-14 23:39:37 瀏覽:140
java事件編程 發布:2025-07-14 23:32:39 瀏覽:495
歐陸gt旅遊配置有哪些 發布:2025-07-14 23:28:39 瀏覽:574
android混淆不混淆第三方jar 發布:2025-07-14 23:26:52 瀏覽:64
怎樣取消共享的文件夾密碼 發布:2025-07-14 23:26:17 瀏覽:978
大鯨魚存儲卡哪裡生產的 發布:2025-07-14 23:06:08 瀏覽:227
c語言函數名宏 發布:2025-07-14 22:58:14 瀏覽:260
java編譯小程序很慢 發布:2025-07-14 22:40:25 瀏覽:203
戰爭年代密碼叫什麼 發布:2025-07-14 22:25:29 瀏覽:711
安卓手機沒信號了代表什麼 發布:2025-07-14 22:21:48 瀏覽:353