content 是备注类型 相关代码
... ...
with ADOQuery1 do
  begin
    Close;
    sql.Clear;
    sql.Add('insert into notes (computer,name,content) ');
    sql.Add('values (:computer,:name,:scontent)');
    Parameters.ParamByName('computer').Value:=vs_compuerName;
    Parameters.ParamByName('name').Value:=FlatEdit1.text;
    Parameters.ParamByName('scontent').Value:=FlatMemo1.text;
                                              //大与255个字符
    prepared; 
    execsql;
  end;
... ...如果不能实现、还可以用什么方法 :)谢谢

解决方案 »

  1.   

    如果你不是用sql语句,而使用Tadotable应该就可以了
      

  2.   

    但是我刚才用你的语句也是过了,运行正常!delphi7,access xp
    字段类型"备注"
      

  3.   

    我用的是delphi6 ado 请问用 Tadotable 怎样实现 insert 纪录阿access 数据库的备注类型可以保存好多 知道大于255 我看了、具体多少没记住
      

  4.   

    我用的是delphi6  ado    
     
    access  数据库的备注类型可以保存好多  至少大于255  我看了、具体多少没记住 我不想用table,因为table 没有效率 :(
      

  5.   

    //问题已近解决、很简单、该给自己满分吧 :)
    ......
    var
      lms_memo:TMemoryStream;
    begin
      if ADOConnection1.Connected=false then
      begin
      with ADOConnection1 do
      begin
        Connected:=false;                                                                       //MS Access Database
        ConnectionString:='Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DSN=dd;DBQ='+getCurrent('path')+'note.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;";Initial Catalog='+getCurrent('path')+'note';
        DefaultDatabase:=getCurrent('path')+'note';
        LoginPrompt:=true;
        Connected:=true;
      end;
      end;
      lms_memo := TMemoryStream.create;
      lms_memo.Write(S_temp[1],length(S_temp));
      try
        with ADOQuery1 do
        begin
          sql.Clear;
          sql.Add('insert into notes (computer,name,content) ');
          sql.Add('values (:computer,:name,:scontent)');
          Parameters.ParamByName('computer').Value:=vs_compuerName;
          Parameters.ParamByName('name').Value:=vs_name;
          Parameters.ParamByName('scontent').LoadFromStream(lms_memo,ftMemo);
          prepared;
          execsql;
          Close;
        end;
      finally
        lms_memo.free;
      end;
    end;
      

  6.   

    LoginPrompt:=true
    你需要提示登陆框?强悍,学习 !~~~