Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
Dim dlg As New OpenFileDialog '定一个新的OpenFileDialog
dlg.Filter= "上报文件|*.mdb" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
MessageBox.Show("你选择的是:" & dlg.FileName,"提示") '提示用户选择的文件
Dim ip as New Importer
ip.SourcePath = dlg.filename '指定数据文件
ip.SourceTableName = "调资基础数据" '指定要导入的表
ip.NewTableName ="数据接收临时判断" '导入后的表名
ip.Format = "Access" '指定导入文件格式
ip. PassWord = “TZX_GWY_JT_8888” '用此属性指定导入文件的密码
ip.Fields = “单位名称” ' 指定要导入的字段(列)
ip.Import()
Dim dws As List(Of String)
dws = DataTables("调资基础数据").GetUniqueValues("", "单位名称") '列出所有单位
For each dw As String In dws '逐个单位判断
Dim dr As DataRow = DataTables("数据接收临时判断").find("[单位名称] = '" & dw & "'")
If dr IsNot Nothing Then
If MessageBox.Show("已存在同单位记录,是否删除?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes then
Forms("删除指定单位数据").Open()
Else
im mg As New Merger
mg.SourcePath = dlg.filename
mg.SourceTableName = "调资基础数据"
mg.DataTableName = "调资基础数据"
mg.Merge()
Syscmd.Table.Delete("数据接收临时判断")
MessageBox.Show("接收数据完成!!!","提示",MessageBoxButtons.OK,MessageBoxIcon.Question)
End If
End If
End If
Next
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:人事工资管理系统.table |
Dim dlg As New OpenFileDialog '定一个新的OpenFileDialog
dlg.Filter= "上报文件|*.mdb" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
MessageBox.Show("你选择的是:" & dlg.FileName,"提示") '提示用户选择的文件
Dim ip as New Importer
ip.SourcePath = dlg.filename '指定数据文件
ip.SourceTableName = "调资基础数据" '指定要导入的表
ip.NewTableName ="数据接收临时判断" '导入后的表名
ip.Format = "Access" '指定导入文件格式
ip. PassWord = “TZX_GWY_JT_8888” '用此属性指定导入文件的密码
ip.Fields = “单位名称” ' 指定要导入的字段(列)
ip.Import()
Dim dws As List(Of String)
dws = DataTables("调资基础数据").GetUniqueValues("", "单位名称") '列出所有单位
For each dw As String In dws '逐个单位判断
Dim dr As DataRow = DataTables("数据接收临时判断").find("[单位名称] = '" & dw & "'")
If dr IsNot Nothing Then
If MessageBox.Show("已存在同单位记录,是否删除?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes then
Forms("删除指定单位数据").Open()
Else
Dim mg As New Merger
mg.SourcePath = dlg.filename
mg.SourceTableName = "调资基础数据"
mg.Format = "Access"
mg. PassWord = “TZX_GWY_JT_8888”
mg.DataTableName = "调资基础数据"
mg.Merge()
MessageBox.Show("接收数据完成!!!","提示",MessageBoxButtons.OK,MessageBoxIcon.Question)
End If
End If
Next
End If
End If
Dim dlg As New OpenFileDialog '定一个新的OpenFileDialog
dlg.Filter= "上报文件|*.mdb" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim ip as New Merger
ip.SourcePath = dlg.filename '指定数据文件
ip.SourceTableName = "调资基础数据" '指定要导入的表
ip.Format = "Access" '指定导入文件格式
ip. PassWord = “TZX_GWY_JT_8888” '用此属性指定导入文件的密码
ip.Fields = “单位名称” ' 指定要导入的字段(列)
ip. DataTableName ="数据接收临时判断" '导入后的表名
ip. Merge()
Dim dws As List(Of String)
dws = DataTables("调资基础数据").GetUniqueValues("", "单位名称") '列出所有单位
For each dw As String In dws '逐个单位判断
Dim dr As DataRow = DataTables("数据接收临时判断").find("[单位名称] = '" & dw & "'")
If dr IsNot Nothing Then
If MessageBox.Show("已存在同单位记录,是否删除?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes then
Forms("删除指定单位数据").Open()
Else
Dim mg As New Merger
mg.SourcePath = dlg.filename
mg.SourceTableName = "调资基础数据"
mg.Format = "Access"
mg. PassWord = “TZX_GWY_JT_8888”
mg.DataTableName = "调资基础数据"
mg.Merge()
MessageBox.Show("接收数据完成!!!","提示",MessageBoxButtons.OK,MessageBoxIcon.Question)
End If
End If
Next
End If
End If
还是有问题,版主帮帮忙!!!谢谢 |
Dim dlg As New OpenFileDialog '定一个新的OpenFileDialog
dlg.Filter= "上报文件|*.mdb" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim ip as New Merger
ip.SourcePath = dlg.filename '指定数据文件
ip.SourceTableName = "调资基础数据" '指定要导入的表
ip.Format = "Access" '指定导入文件格式
ip. PassWord = “TZX_GWY_JT_8888” '用此属性指定导入文件的密码
ip.Fields = “单位名称” ' 指定要导入的字段(列)
ip. DataTableName ="数据接收临时判断" '导入后的表名
ip. Merge()
Dim dws As New List(Of String) '定义一个字符型数组集合
dws = DataTables("调资基础数据").GetUniqueValues("", "单位名称") '列出所有单位
For each dw As String In dws '逐个单位判断
Dim dr As DataRow = DataTables("数据接收临时判断").find("[单位名称] = '" & dw & "'")
If dr IsNot Nothing Then
If MessageBox.Show("已存在同单位记录,是否删除?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes then
Forms("删除指定单位数据").Open()
Else
Dim mg As New Merger
mg.SourcePath = dlg.filename
mg.SourceTableName = "调资基础数据"
mg.Format = "Access"
mg. PassWord = “TZX_GWY_JT_8888”
mg.DataTableName = "调资基础数据"
mg.Merge()
MessageBox.Show("接收数据完成!!!","提示",MessageBoxButtons.OK,MessageBoxIcon.Question)
End If
End If
Next
End If
End If