极
极品铁观音
Unregistered / Unconfirmed
GUEST, unregistred user!
我用D7+sql2000procedure TForm1.Button1Click(Sender: TObject);vari,cnt:integer;x:word;begin dbgrideh1.DataSource.DataSet.DisableControls ; with dbgrideh1.SelectedRows do if count>0 then begin if count>cnt then cnt:=cnt else cnt:=count; for x:=0 to cnt-1 do begin if indexof(items[x])>-1 then begin dbgrideh1.DataSource.DataSet.Bookmark:=items[x]; with adoquery2 do begin close; sql.Clear ; sql.Add('select ph_num into #tmp from hz_grou where 1=2');//这个地方应该如何改为所选的记录而不是全部。这里能创建临时表但记录是全部的而不是所选。 execsql; active:=true; end; end; end;DBGrideh1.DataSource.DataSet.enableControls ;dbgrideh1.DataSource.DataSet.enableControls ; end; end;//还望有经验的高手指点