有两个GRID,grid1中显示所有要打开的文件名列表,现在要做的是无论是鼠标点击还是光标移动,grid2中显示Grid1中鼠标点中的那一列或者光标所在的那一列的文件,目前我只能做到鼠标点击,但是两者结合却做不出来。请高手指点》,我在grid1的Click事件中写的是这样的 with clientdataset2 do begin Close; RemoteServer:=socketconnection1; ProviderName:='dm_dsp001'; CommandText:='select * from '+trim(clientdataset1.fieldbyname('表名').AsString); Open; First; end; 这只有鼠标点击事件,光标移动事件不知怎么写
谢谢迷茫ing,照你的做了,可是我光标移到最后不小心又向下移了一下出现--------------------------- Debugger Exception Notification --------------------------- Project Project1.exe raised exception class EOleException with message '第 1 行: 'from' 附近有语法错误。'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------
with clientdataset2 do
begin
Close;
RemoteServer:=socketconnection1;
ProviderName:='dm_dsp001';
CommandText:='select * from '+trim(clientdataset1.fieldbyname('表名').AsString);
Open;
First;
end;
这只有鼠标点击事件,光标移动事件不知怎么写
在需要触发的地方都写上你要求的代码
为什么很多这样的问题都会在非技术区呢
那我以后有类似的问题应到哪里去。
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EOleException with message '第 1 行: 'from' 附近有语法错误。'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------