在FORM 中使用了一个ADOQuery1:进行了DataSource1选择
并且这样写了代码:
procedure TForm1.Button4Click(Sender: TObject);
begin
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Text := 'insert into animals(name,size,weight,area,bmp) values('+quotedstr(Edit1.Text)+','+quotedstr(Edit2.Text)+','+quotedstr(Edit3.Text)+','+quotedstr(Edit4.Text)+','+quotedstr(Edit5.Text)+')';
ExecSQL;
end;
end;但系统报错:Missing connection or connectionString
该怎么修改呢????
并且这样写了代码:
procedure TForm1.Button4Click(Sender: TObject);
begin
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Text := 'insert into animals(name,size,weight,area,bmp) values('+quotedstr(Edit1.Text)+','+quotedstr(Edit2.Text)+','+quotedstr(Edit3.Text)+','+quotedstr(Edit4.Text)+','+quotedstr(Edit5.Text)+')';
ExecSQL;
end;
end;但系统报错:Missing connection or connectionString
该怎么修改呢????
解决方案 »
- 如何把guid发散(或收敛)为32位(或64位)int
- Delphi中用ADOQuery查询Access中的数据记录,如何取出字段值
- 安装IOCP UDP组件时出错
- dbgrid 和dbnavigator连用,遇到布尔型时老是出错!
- 请问,如何更改TMEMO中的文字行距?
- 真的不想搞数据库了,有什么其他的出路吗?
- 使用一个文见
- 我从Borland公司下载了一个DELPHI5注册不了,我从Borland公司下载了一个DELPHI5注册不了,按照安装步骤,到它指示的主页上注册后,不知如何
- *******50分求解
- 关于窗口的问题?一定给分!
- WISE打包问题
- 用ADO做数据库连接时,多表更新如何控制?就象BDE的TUpdateSQL的效果
一个DataSource1:设置了DataSet为Table1,TableName为animals.dbf
一个Database1:AliasName为DBDEMOS,DatabaseName为demo(我选择内置的数据库及表)
with Table1 do
......
.....