|
我現在有一個.TXT的文件.內容為
123456,2003-10-29,12:00:35
123457,2003-10-29,12:01:37
...
想要匯入到SQL中.
不知道用VB如何寫.請高手把您的程序碼給偶學一下....謝謝.
-------------------------
已經寫好的窗口及程序碼
Private Sub Form_Load()
Dim filename, file1
file1 = Format(Now(), "yymmdd")
filename = "\\SERVER\C$\DATA\A" & file1 & ".txt" '一般TXT文件名都為A年月日.TXT
Me.filename.Text = filename
End Sub
Private Sub openfile_Click()
Dim thefilename
CommonDialog1.Filter = "文本文件(*.TXT)|*.txt"
CommonDialog1.ShowOpen
thefilename = CommonDialog1.filename
If thefilename = "" Then
Else
filename.Text = thefilename
filename.ToolTipText = thefilename
End If
End Sub |
|