insertrecord 是数据库的信息语句么?
具体应该怎么用??需要先定义么?
insertrecord([edit1.Text,edit2.Text,edit3.Text,edit4.Text]);
       会出现Undeclared identifier:'insertrecord'麻烦帮忙解决下- -

解决方案 »

  1.   

    InsertRecord方法用于在表中插入一条新记录直接在表中插入一条新记录,新记录的各个字段值作为
    InsertRecord方法的参数传递给新记录并且不需显式地调用post方法,将插入的新记录写回数据库表。
    Undeclared identifier:'insertrecord' 应该是你没有uses该单元
      

  2.   

    Undeclared identifier:'insertrecord' 应该是你没有uses该单元?
    这个是什么意思?
    比如这个是Unit2
    自己在这个里面也要 USE UNIT2么?试了下...还是一样..?
    delphi里有什么语句不能直接使用?我以前学过JAVA..好像没遇到过这样的问题..
      

  3.   

    这个insertrecord应该是你程序中自己写的一个过程,找到看看具体是如何写的
      

  4.   

    我按书上一个案例.新建了一个工程
     if length(edit1.Text)=0 then
        messagedlg('no field value to delete!',mterror,[mbcancel],0)
        else
        with table1 do
        begin
         if findkey([edit1.Text]) then
           messagedlg('record has been there!',mterror,[mbcancel],0)
           else
           insertrecord([edit1.Text,55,55,55]);  //输入的信息
           edit1.Text:='';
           end;在edit1有信息的情况下插入将信息写入数据库 没有的话弹出错误提示如果我把这段 COPY到我写的上面..
    Undeclared identifier:'findkey' 
      

  5.   

    java 里也不是想用那个类就直接使用.要将类所在的包引入才行啊.
      

  6.   

    Undeclared identifier:'insertrecord' 
    这个是什么意思? 
    ------------------------------------------------意思是:未重新声明的'insertrecord' 函数 
    说明你在使用'insertrecord' 函数时,并没有按照参数的格式来填写函数,
    有可能你的传入参数不够,或者类型不匹配,都会有此提示的.
      

  7.   


    JAVA里是要引用包..系统包默认就有引用.自己组建的我也知道怎么引用
    可是DELPHI怎么"引用包"? USE 什么? 那个 insertrecord属于那个包?我自己理解的是   insertrecord格式
    insertrecord([数据库第一字段,第二字段,...,第N字段]);
    有什么不对??望指证~~~谢谢!
      

  8.   

    例如 insertrecord([edit1.Text,edit2.Text,edit3.Text,edit4.Text]); 
    插入 4 个字段进数据库..
    是这个有什么错误么? 
      

  9.   

    未引用头文件,所以不认识你的函数.你可以用SQL语句啊,INSERT 
      

  10.   

    insertrecord自定义的过程吧?
    在你的程序里面没有他的实现,当然显示Undeclared identifier:'insertrecord' 
      

  11.   

    insertrecord
    Inserts a new, populated record to the dataset and posts it.
    example
    Customer.InsertRecord([CustNoEdit.Text, CoNameEdit.Text, AddrEdit.Text, Null, Null, Null, Null, Null, Null, DiscountEdit.Text]);
    explain: This statement appends a record to the Customer dataset. Note that Nulls are entered for some of the values, but are not required for missing values at the end of the array argument.
    看明白了吗?
      

  12.   


    - -;
    你这个好像是从别的单元引用的吧???
    Customer.InsertRecord这个
    其他的就不懂了
      

  13.   

    不好意思,我从DEPHI转成BCB了,很投入的转...呵呵.....所以叫头文件了.在DELPHI中叫单元,其它单元.....UNIT
    在C语言中,一般把要用的文件都在顶头包含,保存成后缀为h (Head)在DELPHI中叫UNIT...但意思是一样的.你要用什么函数,都要把这个函数放到你要用的上面(一般都是头部引用)
    那么你在下面的代码中,才可以正常引用该函数.
      

  14.   

    initialization用于初始化该库单元,此处的代码最先执行
    如果多个库单元中包含initialization部分
    那么它们的执行顺序就和Program的uses部分引用单元的出现顺序是一致的
    它包括单元引用,常量,类型,变量,过程和函数的声明