Rss & SiteMap

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

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

标题:请教下列代码在编译后运行到选文件夹“确定”就出错,但在开发状态运行就正常

1楼
fvcfox 发表于:2024/5/30 11:14:00
Dim tb As Table = Tables("主窗口_table10")
If tb.Rows.count < 1 Then
    Return 
End If

Dim tbr As Row = tb.Current
Dim nr As DataRow = tbr.DataRow
Dim nf As String
Dim nf1 As String
Dim drs As List(Of DataRow)
drs = tb.DataTable.S elect("[选中] =true")
If (tb.Current("选中") = True And drs.Count = 1) OrElse drs.Count = 0 Then
    drs = tb.DataTable.Select ("id='" & tbr("_Identify") & "'")
End If 
Dim dlg As New FolderBrowserDialog
If dlg.ShowDialog = DialogResult.Ok Then
    For Each dr As DataRow In drs
        If dr.SQLLoadFile("files", dlg.SelectedPath & "\" & dr("文件名").trim() & dr("文件名后缀").trim()) = False Then '如果提取文件失败
            Messagebox.Show("附件提取失败,可能并不存在附件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End if 
    Next
    Messagebox.Show(drs.Count & "条 记录下载成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
2楼
有点蓝 发表于:2024/5/30 11:22:00
出什么错?
3楼
fvcfox 发表于:2024/5/30 12:35:00

图片点击可在新窗口打开查看此主题相关图片如下:微信截图_20240530123441.png
图片点击可在新窗口打开查看
4楼
有点蓝 发表于:2024/5/30 13:35:00
窗口表是副本?还是sqltable?或者fill、DataSource绑定的?SQLLoadFile仅支持主表和副本使用

代码放在什么事件的?
5楼
fvcfox 发表于:2024/5/30 14:51:00
sqltable,用fill生成的表,代码是在窗口的Button
6楼
有点蓝 发表于:2024/5/30 14:58:00
SQLLoadFile仅支持主表和副本使用。另外使用sql取吧:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=154713
共6 条记录, 每页显示 10 条, 页签: [1]

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

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