如题:
  请问你们有没有这方面的代码,感激不尽!!
我做了一个,运行时出现下面的提示:Project Project1.exe raised eception class EDBEngineError with message 'Insufficient memory for this operation.Alias'Process stopped!
我学习的不深,还请高手帮助!!!

解决方案 »

  1.   

    SQL SERVER200+delphi7 用流的方法可以!
      

  2.   

    用IMAGE在SQL存文件
    在DELPHI中用内存流
    TBLOB
      

  3.   

    用IMAGE在SQL存文件
    在DELPHI中用内存流  var  vsound :Tmemorystream ;
    TBLOB
    在用TQUERY  TTABLE存取就行了。
      

  4.   

    能不能提供这方面的代码,我是初学者,很多地方不明白,我用的是DEIPHI内嵌的数据库。
    万分感谢!!!1
      

  5.   

    这是我从书上找来的代码,能够运行,但是在点击列表框的时侯弹出“写内存地址错误 
    ”的对话框。问题怎么解决呢
     
    procedure TForm3.FormCreate(Sender: TObject);
    var
       mem:TMemoryStream;
    begin
       if table1.Eof and table1.Bof then
       begin
         with table1 do
         begin
          Insert;
          FieldByName('Name').AsString:='音乐';
          mem:=TMemoryStream.Create();
          mem.LoadFromFile('E:\第二学期\多媒体\作业\sound\music.WAV');
          TBlobField(FieldByName('Data')).LoadFromStream(mem);
          post;
          mem.Free;
        end;
       end;
       with table1 do
       begin
         First;
         while not Eof do
         begin
          ListBox1.Items.Add(FieldByName('Name').AsString);
          Next;
         end;
       end;
     end;
    procedure TForm3.ListBox1Click(Sender: TObject);
    var
       FileName:string;
       FileStream:TFileStream;
       BlobStream:TStream;
    begin
      with table1 do
      begin
        First;
        while not Eof do
        begin
        if FieldByName('Name').AsString=ListBox1.Items[ListBox1.ItemIndex]
        Then
             break;
             Next;
        end;
             //为字段创建BLOG数据流
             BlobStream:=CreateBlobStream(FieldByName('Data'),bmRead);
             if BlobStream.Size=0 Then
             begin
             BlobStream.free;
             Exit;
             end;
             BlobStream.Position:=0;
             FileName:='Sound.tmp';
             if FileExists(FileName) Then
               DeleteFile(FileName);
               FileStream:=TFileStream.Create(FileName,fmcreate or fmopenwrite);
               FileStream.CopyFrom(BlobStream,BlobStream.Size);
               FileStream.Free;
               FileStream.Free;
               PlaySound(PChar(FileName),0,SND_FILENAME+SND_ASYNC);
               if FileExists(FileName) Then
                 DeleteFile(FileName);
                 end;
    end;