L
ldk0110
Unregistered / Unconfirmed
GUEST, unregistred user!
with savedialog1 do<br> begin<br> InitialDir:=extractfilepath(application.exename);<br> FileName:='zsgl';<br> Title:='保存文件';<br> end;<br> if savedialog1.Execute then<br> ledit1.Text:=savedialog1.FileName;<br><br><br> if directoryexists(ExtractFilePath(LEdit1.Text)) then //判断路径是否存在<br> begin<br> LEdit1.Text:=ExtractFilePath(LEdit1.Text)+ChangeFileExt(ExtractFileName(LEdit1.Text),''); //把有扩展名文件名的扩展名去掉<br> if FileExists(LEdit1.Text) then<br> if Application.MessageBox('文件已存在是否覆盖?', '确认', mb_yesno) <> 6 then<br> Exit;<br> ADOCommand1.CommandText:='';<br> ADOCommand1.CommandText :=' backup database zsgl to disk = ath with init';<br> ADOCommand1.Parameters.ParamByName('path').Value :=TRIM(LEdit1.Text);<br> ADOCommand1.Execute;<br>我这样执行后生产的备份文件名自动截取了4个字符,如我输入的文件名是asdfg结果却便为a了,这是怎么回事啊,我一步一步的调一直没发现问题出在哪!!!!