各位老大帮看看吧
integer li_FileNum, loops, i
long ll_len long flen, bytes_read, new_pos
blob b, tot_b
string ls_pic
ls_pic = "e:\1.bmp"
// Set a wait cursor
SetPointer(HourGlass!)
// Get the file length, and open the file
flen = FileLength(ls_pic)
li_FileNum = FileOpen(ls_pic, &
StreamMode!, Read!, LockRead!)
// Determine how many times to call FileRead
IF flen > 32765 THEN
IF Mod(flen, 32765) = 0 THEN
loops = flen/32765
ELSE
loops = (flen/32765) + 1
END IF
ELSE
loops = 1
END IF
// Read the file
new_pos = 1
FOR i = 1 to loops
bytes_read = FileRead(li_FileNum, b)
tot_b = tot_b + b
ll_len = len(tot_b)
NEXT
FileClose(li_FileNum)
p_1.setpicture(tot_b)
int li_id
select isnull(max(id),0)
into :li_id
from img_base;
li_id = li_id + 1
insert into img_base values(:li_id,null);
if sqlca.sqlcode <> 0 then
messagebox("insert",sqlca.sqlerrtext)
rollback;
return
end if
sqlca.autocommit = true
updateblob img_base
set img = :tot_b
where id = :li_id;
sqlca.autocommit = false
if sqlca.sqlnrows = 0 then
messagebox("update",sqlca.sqlerrtext)
rollback;
return
else
commit;
end if
为什么总说“在关键字‘NULL’附近有语法错误”啊?