出错信息,[microsoft][odbc sql server driver]没有执行可选特性
代码如下:
adocommand1.CommandText:='insert into 。。';
adocommand1.Parameters.CreateParameter('IDInfo',ftstring,pdinput,10,IDInfo);
。
adocommand1.Execute;
代码如下:
adocommand1.CommandText:='insert into 。。';
adocommand1.Parameters.CreateParameter('IDInfo',ftstring,pdinput,10,IDInfo);
。
adocommand1.Execute;
uses DB, ADODB;procedure TForm1.Button1Click(Sender: TObject);
var
ADOQ: TADOQuery;
begin
ADOQ := TADOQuery.Create(Self);
ADOQ.Close;
ADOQ.ConnectionString :='Provider=SQLOLEDB.1;Password=123;Persist Security '+
'Info=True;User ID=sa;Initial Catalog=tempdb;Data Source=db';
ADOQ.SQL.Text := 'Insert Into.........';
ADOQ.ExecSQL;
ADOQ.Free;
end;
adocommand1.Parameters.CreateParameter('IDInfo',ftstring,pdinput,10,IDInfo);
adocommand1.Parameters.CreateParameter('CourseType',ftstring,pdinput,10,CourseType);
adocommand1.Execute;
'Info=True;User ID=sa;Initial Catalog=tempdb;Data Source=dbServer';
|_用户名 |_数据库名 |_数据库机器名
adocommand1.CommandText:='insert into CourseInfo(id,type) values(:IDInfo,:CourseType);
adocommand1.Parameters.CreateParameter('IDInfo',ftstring,pdinput,10,IDInfo);
adocommand1.Parameters.CreateParameter('CourseType',ftstring,pdinput,10,CourseType);
adocommand1.Execute;