Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共5 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:将文件存储到指定文件夹中

1楼
kevin 发表于:2011/12/28 16:56:00
dim r as datarow = e.datarow FileSys.CreateDirectory("D:\" & r("编码")) 以上代码是当表中增加一行时,自动在D盘创建以“编码”命名的文件夹, 我希望能:当增加了行,假如编码为’1001‘,此时D盘自然就创建了名为‘1001’的文件夹,这个文件夹只能为该编码的数据服务; 该表中,有一个“文件管理”的列,属性为多文件类型。我需要当我插入任何文件时,能自动存储在这个文件夹内, 请问如何处理。
2楼
狐狸爸爸 发表于:2011/12/28 16:59:00

参考:

http://www.foxtable.com/help/topics/2209.htm

 

3楼
blackzhu 发表于:2011/12/28 16:59:00
 

Book.Save(ProjectPath & "Attachments\规格\" & Tables("订单情况").Current("IO") & "\" & Tables("订单情况").Current("IO") & T3 & T2 & T4 & T & ".xls")

 

 

excel报表打印最后有BOok.save,直接保存在你的路径下.

4楼
kevin 发表于:2011/12/28 17:23:00
狐爸你好: Dim dr As DataRow = e.DataRow If dr.IsNull("简称") Or Dr.IsNull("日期") Then MessageBox.Show("不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) e.Cancel = True Else e.SubFolder = dr("简称") & "\" & dr("日期").Year ‘ 这个代码最终是以 “简称”\"2011“为文件名的,我希望是以20111228的形式命名。这应该如何做? End If
5楼
狐狸爸爸 发表于:2011/12/28 17:33:00

每次发帖,最好将你的代码排一下版,方便别人。

 

Dim dr As DataRow = e.DataRow
If dr.IsNull("简称") Or Dr.IsNull("日期") Then
    MessageBox.Show("不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) e.Cancel = True
Else
    e.SubFolder = dr("简称") & "\" & Format(dr("日期"),"yyyyMMdd")
End If

 

参考:

http://www.foxtable.com/help/topics/0360.htm

 

 

共5 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 2 queries.