var rs:TAdoquery; x:integer; begin rs:=TAdoquery.create(nil); rs.connection:=con1; //con1为已经设置好的数据库链接 TADOConnection rs.CursorLocation:=cluseserver; rs.CursorType:=ctstatic; rs.sql.text:='Select * from table1'; rs.open; for x:=0 to rs.fieldcount-1 do begin if rs.fields[x].datatype=ftAutoInc then begin showmessage('field' + rs.fields[x].FieldName + 'is autoincrement'); end; end; end;
var rs:TAdoquery; x:integer; begin rs:=TAdoquery.create(nil); rs.connection:=con1; //con1为已经设置好的数据库链接 TADOConnection rs.CursorLocation:=cluseserver; rs.CursorType:=ctstatic; rs.sql.text:='Select * from table1'; rs.open; for x:=0 to rs.fieldcount-1 do begin if rs.fields[x].datatype=ftAutoInc then begin showmessage('field' + rs.fields[x].FieldName + 'is autoincrement'); end; end; end;
rs:TAdoquery;
x:integer;
begin
rs:=TAdoquery.create(nil);
rs.connection:=con1; //con1为已经设置好的数据库链接 TADOConnection
rs.CursorLocation:=cluseserver;
rs.CursorType:=ctstatic;
rs.sql.text:='Select * from table1';
rs.open;
for x:=0 to rs.fieldcount-1 do
begin
if rs.fields[x].datatype=ftAutoInc then
begin
showmessage('field' + rs.fields[x].FieldName + 'is autoincrement');
end;
end;
end;
var
rs:TAdoquery;
x:integer;
begin
rs:=TAdoquery.create(nil);
rs.connection:=con1; //con1为已经设置好的数据库链接 TADOConnection
rs.CursorLocation:=cluseserver;
rs.CursorType:=ctstatic;
rs.sql.text:='Select * from table1';
rs.open;
for x:=0 to rs.fieldcount-1 do
begin
if rs.fields[x].datatype=ftAutoInc then
begin
showmessage('field' + rs.fields[x].FieldName + 'is autoincrement');
end;
end;
end;
结帖!观者有份!