The following example uses a blob stream to write a string to the end of the Notes field in the Tasks table.procedure TForm1.AppendNoteClick(Sender: TObject);var
  Stream: TStream;
  S: string;
begin
  with Tasks do
  begin    Edit;    if State = dsEdit then
    begin
      Stream := CreateBlobStream(FieldByName('Notes'), bmReadWrite);
      try
        Stream.Seek(0, 2); {Seek 0 bytes from the stream's end point}
        S := ' This line will be added to the end.';
        Stream.Write(PChar(S)^, Length(S));
        Post;
      finally
        Stream.Free;
      end;
    end;
  end;
end;
这是例子,你看看!还有就是你确定你的FORM用了dm吗?

解决方案 »

  1.   

    if dm.query1.State=dsedit then
    if dsedit in dm.query1.State then
      

  2.   

    if dm.query1.State is [dsedit] then
      

  3.   

    Sorry, I is wrong!
      

  4.   

    [Error] Unit10.pas(82): Undeclared identifier: 'dsedit'
    出现这样的错误,怎么回事啊
      

  5.   

    是不是相应的unit没有uses呢?
      

  6.   

    在uses 里加入db单元
    就肯定可以了
      

  7.   

    dsedit这东西是在db单元里定义的,在uses里加入db单元就肯定可以了
      

  8.   

    建议你把有问题的那部分代码删掉,重新写一遍(不要Ctrl+c,Ctrl+V)
      

  9.   

    interface
     uses  db;
      

  10.   

    谁帮我看看,就这么几句话,到底那里错了
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, DB, DBTables, StdCtrls, Mask, DBCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        Button2: TButton;
        DBEdit1: TDBEdit;
        Query1: TQuery;
        DataSource1: TDataSource;
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
    query1.Insert;
    end;procedure TForm1.Button2Click(Sender: TObject);
    begin
     if query1.State is [dsinsert] thenend;end.
      

  11.   

    if query1.State is [dsinsert] then
    改为
    if query1.State in [dsinsert] then
    通过
      

  12.   

    if query1.State in [dsinsert] then