在DELPHI +ORACLE 开发C/S时,如何插入含有BLOB字段的记录,又怎么读出BLOB记录,打印BLOB字段了??
谢了!!!!!!等待中。
谢了!!!!!!等待中。
解决方案 »
- 对比文件的修改时间
- cxGrid数据显示问题
- 有人知道如何在打开一个EXE之前做Hook吗?
- 为何打印机未连接时,程序就报错
- 这个sql语句怎么写?
- 讨论:关于结分的问题——支持者请签名,来者有分
- db2安装问题请教,新装了WIN2000再装DB2,安装的过程中报了错误,还是完成了,但是建立数据库客户段的时候,只有DB2的ODBC选项,没有DB2
- 好几天没有来了,因为有了新电脑,一台兼容机(自己配的),一台手提,忙着装软件和转数据。送些分给大家//准程序员
- BDE连接ORACLE的问题
- readln()涵数问题
- 怎么知道代码是在delphi的那个版本下写的?
- 如何取得指定进程的exe文件的路径?
var
bmp1: Tbitmap;
stream1: TMemorystream;
begin
bmp1:= Tbitmap.Create;
stream1 := TMemorystream.Create;
bmp1.SaveToStream(stream1);
TBlobField(adoquery1.Fields[0]).LoadFromStream(stream1);
end
bmp1.LoadFromFile('E:\This Week\惠州无线资源管理项目\pictures\zuhezaixian2.bmp');
var
fs: TFileStream;
begin
if not FileExists(edtFileName.Text) then
begin
Application.MessageBox(PChar('找不到文件' + edtFileName.Text), '错误', MB_ICONERROR);
Exit;
end;
fs := TFileStream.Create(edtFileName.Text, fmOpenRead);
ADOTable1.Append;
try
fs.Position := 0;
TBlobField(ADOTable1.FieldByName('document')).LoadFromStream(fs);
ADOTable1.Post;
finally
fs.Free;
end;
end;
***********************************************
//显示
var filename, dir: string;
begin
dir := ExtractFilePath(ParamStr(0)) + 'temp';
if not DirectoryExists(dir) then
CreateDir(dir);
try
fileName := dir + '\temp' + ADOTable1.FieldByName('id').AsString
+ ADOTable1.FieldByName('ext').AsString;
TBlobField(ADOTable1.FieldByName('document')).SaveToFile(fileName);
ShellExecute(handle, 'Open', PChar(fileName), nil, nil, SW_NORMAL);
finally
end;