有必要这样做吗?是不是相反了?应该在程序中控制联接才对啊
解决方案 »
- 看看你使用了多少delpphi的快捷键
- 怎么将Unicode编码的字符串转变成DbCS编码?
- 关于ClientDataSet....
- 怎么把设计期间的quickreport的控件的边框去掉,还有边边上讨厌的标尺
- 关于报表的问题。
- 现在的it业动荡不安,初学都问一个非技术问题,请各位大哥指路!!!!
- TQuery类变量赋值时出现非法存取问题??????
- 请教各位怎样在一个单元里调用另一个单元的变量?
- 哪儿有错呀!!!
- 暂住费等七项外来务工经商人员费用将被取消。{是不是可以不办暂住证了?}
- 关于用DELPHI和MSSQL做一个C/S的简单数据库管理系统的问题!!
- 消息传递的问题???高手来看!!!!
或者改目录名也可以,我没做过,请各位指点
var f : file;
begin
Rename(f, 'file new name');
end;
2.搜索目录查找指定文件的函数
FindFirst, FindNext, FindClose
事例程序:
procedure TForm1.Button1Click(Sender: TObject);var
sr: TSearchRec;
FileAttrs: Integer;
begin
StringGrid1.RowCount := 1;
if CheckBox1.Checked then
FileAttrs := faReadOnly
else
FileAttrs := 0;
if CheckBox2.Checked then
FileAttrs := FileAttrs + faHidden;
if CheckBox3.Checked then
FileAttrs := FileAttrs + faSysFile;
if CheckBox4.Checked then
FileAttrs := FileAttrs + faVolumeID;
if CheckBox5.Checked then FileAttrs := FileAttrs + faDirectory;
if CheckBox6.Checked then
FileAttrs := FileAttrs + faArchive;
if CheckBox7.Checked then FileAttrs := FileAttrs + faAnyFile; with StringGrid1 do
begin
RowCount := 0; if FindFirst(Edit1.Text, FileAttrs, sr) = 0 then begin
repeat
if (sr.Attr and FileAttrs) = sr.Attr then
begin
RowCount := RowCount + 1;
Cells[1,RowCount-1] := sr.Name;
Cells[2,RowCount-1] := IntToStr(sr.Size);
end;
until FindNext(sr) <> 0;
FindClose(sr);
end;
end;
end;
3.只要这一步能够实现,那么修改修改mysql数据库中指向这个文件的链接,就比较简单了.