用程序QUERY1.APPEND增加记录,发现增加不进去,不知何故?

解决方案 »

  1.   

    用sql语句增加
    insert 表名 (字段名) values(值)
      

  2.   

    先 adoquery1.insert;
    然后 adoquery1.add(sql); 或 其它
    最后 adoquery1.post;
      

  3.   

    我是想曾加一条空记录,然后用edit组件把值添加进出,不知为何,空记录添加不进去
      

  4.   

    adoquery1.append;//添加空记录
      

  5.   

    Query1.RequestLive:=true;
     Query1.Open;或者Query1.Insert;设置R e q u e s t L i v e属性来说明执行查询时,是否允许B D E即时向应用程序返回对数据结果
    的修改。如果RequestLive 属性是默认值F a l s e,表示查询将返回只读的数据结果;反之,如
    果R e q u e s t L i v e属性是Tr u e,则返回修改的数据结果。但需要注意的是, RequestLive 属性是
    Tr u e并不能保证B D E一定返回修改的数据结果,它还有其他条件的限制。在激活一个T Q u e r y
    组件后,可以通过查看C a n M o d i f y属性值来决定B D E是否能返回修改的数据结果。
      

  6.   

    Requests an updatable query result set from the database.property RequestLive: Boolean;DescriptionRequestLive is a request that a SELECT query returns an updatable (or live) or read-only result set from the database back-end. A False value for RequestLive (the default) causes the result set to always be read-only. No request is made to the database back-end to return an updatable result set. A True value for RequestLive is a request to database back-end to return an updatable result set. An updatale result set can be made available to the application抯 user for direct data editing through visual data controls.A True value for RequestLive is a request for an updatable result set. It does not guarantee that the database back-end will return an updatable result set. See the documentation for the specific database system used for the criteria needed for a live query result set. If the database cannot return an updatable result set, a read-only result set is returned instead. This is done automatically and usually without error. Some database systems may raise an exception on requests for live result sets that cannot be fulfilled. Check the success of the request by inspecting thr dataset component抯 CanModify property.If the SQL statement used in a TQuery is a general, muli-row SELECT statement, RequestLive can be used with either a True or a False value. For all other SQL statements issued from the TQuery, RequestLive should only be set to False. These other statements include noncursor single-row SELECT statements (more commonly found in stored procedure programming), noncursor Data Manipulation Language (DML) statements like UPDATE or DELETE, and Data Definition Language (DDL) statements like CREATE TABLE and DROP INDEX.Note: All multi-table queries return read-only result sets. Other conditions may cause a query to return a read-only result set. For local tables (such as dBASE and Paradox), see the local SQL help file for rules governing live result sets (updatable queries). For other table types (such as InterBase, Oracle, and Sybase), consult the documentation for the specific database system.
    Note: Some SQL database systems require strict case-sensitivity for names of metadata objects in SQL statements. These SQL databases typically have problems with the way metadata names are passed by the BDE in live queries and an exception is raised. A workaround that helps in most cases is to enclose the metadata object references (like table and column names) in quotation s.