文本文件第一行是标题,如何根据标题来自动创建表,非临时表。
当前代码如下:
Dim cm2 As WinForm.TextBox = e.Form.Controls("TextBox3")
If cm2.Text="" Then
MessageBox.Show("请先输入拟创建的表名,然后再进行文件选择.字段匹配.数据导入操作!","温馨提示")
Else
With e.Form
Dim dlg As New OpenFileDialog
dlg.Filter= "文本文件|*.txt"
If dlg.ShowDialog = DialogResult.Ok Then
.Controls("TextBox1").value = dlg.FileName
End If
Dim Multi As String
Dim strs As String = FileSys.ReadAllText(dlg.FileName, Encoding.Default)
Dim Values11() As String = strs.Replace(vbcr,"").split(vblf)
For i1 As Integer = 0 To 0
Dim rs As String = Values11(0)
For i As Integer = 0 To 0
Dim cs() As String = rs.Split(vbtab)
output.Show(cs(0))
Multi = cs(0) 如何根据这个得到的值来自动创建一个表名为统计 表字段名为multi的数据表呢?
Next
Next
End With
End If