insertrecord 是数据库的信息语句么?
具体应该怎么用??需要先定义么?
insertrecord([edit1.Text,edit2.Text,edit3.Text,edit4.Text]);
会出现Undeclared identifier:'insertrecord'麻烦帮忙解决下- -
具体应该怎么用??需要先定义么?
insertrecord([edit1.Text,edit2.Text,edit3.Text,edit4.Text]);
会出现Undeclared identifier:'insertrecord'麻烦帮忙解决下- -
InsertRecord方法的参数传递给新记录并且不需显式地调用post方法,将插入的新记录写回数据库表。
Undeclared identifier:'insertrecord' 应该是你没有uses该单元
这个是什么意思?
比如这个是Unit2
自己在这个里面也要 USE UNIT2么?试了下...还是一样..?
delphi里有什么语句不能直接使用?我以前学过JAVA..好像没遇到过这样的问题..
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'
这个是什么意思?
------------------------------------------------意思是:未重新声明的'insertrecord' 函数
说明你在使用'insertrecord' 函数时,并没有按照参数的格式来填写函数,
有可能你的传入参数不够,或者类型不匹配,都会有此提示的.
JAVA里是要引用包..系统包默认就有引用.自己组建的我也知道怎么引用
可是DELPHI怎么"引用包"? USE 什么? 那个 insertrecord属于那个包?我自己理解的是 insertrecord格式
insertrecord([数据库第一字段,第二字段,...,第N字段]);
有什么不对??望指证~~~谢谢!
插入 4 个字段进数据库..
是这个有什么错误么?
在你的程序里面没有他的实现,当然显示Undeclared identifier:'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.
看明白了吗?
- -;
你这个好像是从别的单元引用的吧???
Customer.InsertRecord这个
其他的就不懂了
在C语言中,一般把要用的文件都在顶头包含,保存成后缀为h (Head)在DELPHI中叫UNIT...但意思是一样的.你要用什么函数,都要把这个函数放到你要用的上面(一般都是头部引用)
那么你在下面的代码中,才可以正常引用该函数.
如果多个库单元中包含initialization部分
那么它们的执行顺序就和Program的uses部分引用单元的出现顺序是一致的
它包括单元引用,常量,类型,变量,过程和函数的声明