想数据库插入数据在ADO中学SQL(0分)

  • 主题发起人 主题发起人 fossil
  • 开始时间 开始时间
F

fossil

Unregistered / Unconfirmed
GUEST, unregistred user!
在ADO中写:insert into temp(a,b)
valuse(:a,:b)
在程序中应该怎么写插入语句
with ado do
begin
??
nd;
 
//你要賦的值
你可以這樣寫:
With ado do
Begin
Close;
Parameters.ParamByName('a').Value:=a1; //a1你要賦的值
Parameters.ParamByName('b').Value:=b1;; //b1你要賦的值
Prepared;
ExecSQL;
End;
 
你真是好人,美分也回答
那你在告诉我PREPARED 是什么意思
EXECSQL与OPEN有什么区别
 
OPEN返回数据集(select)
ExecSql执行Delete,insert等操作型Sql语句
最后问地这些都可以通过看书和查Delphi帮助解决的。

Prepared地帮助:
property Prepared: WordBool;

Description

Set Prepared before calling the Execute method
to specify whether ADO prepares the command.
If Prepared is set to True and the command component
is connected to a data store, ADO prepares
the command before executing it. If Prepared is set to False,
ADO does not prepare the command.
 
接受答案了.
 
后退
顶部