0

hi i need an vb.net program for access database, in an sql query for
append (single column) .txt file into existing .mdb table ,

i used this code but is not working

Pth2 = My.Application.Info.DirectoryPath

        STTConn2.ConnectionString = "Provider=Microsoft.jet.oledb.4.0; Data Source=" & Pth2 & "\LugatWordsOk.mdb; User Id=admin; Password=;"
        STTSql2 = "bulk insert tablex from 'path' with [fieldterminator=',']"


        STTDa2 = New OleDbDataAdapter(STTSql2, STTConn2)

        STTDs2 = New DataSet
        STTDa2.Fill(STTDs2, "DisplayCenterData")
        STTDt2 = STTDs2.Tables("DisplayCenterData")

        STTCmb2 = New OleDbCommandBuilder(STTDa2)

        DataGridView1.DataSource = STTDt2

        MsgBox("work done")

above query is not working, and also i have a txt file with single column and no column terminator
like

ab
abc
dder
wer
sdr
xddere

i have to convert and then append that txt file into existing access table

plz help

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by lolafuertes
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.