I am using the oledbadapter.fill function to import large .csv files into a VB.net DataTable and would like to show a progress bar.
Dim sConnectionString As String = "Provider=Microsoft.Jet.OL
EDB.4.0;Ex
tended Properties=Text;Data Source=" & file.DirectoryName
Dim objConn As New OleDbConnection(sConnectio
nString)
objConn.Open()
Dim OleDbString As String = "SELECT * FROM [" & file.Name & "]"
Dim objCmdSelect As New OleDbCommand(OleDbString, objConn)
Dim objAdapter1 As New OleDbDataAdapter
Dim objDataset1 As New DataSet
objAdapter1.SelectCommand = objCmdSelect
objAdapter1.Fill(objDatase
t1, "SourceData")
dTable = objDataset1.Tables(0)
dTable.TableName = SOURCE_TABLE_NAME
objConn.Close()
Is there any way to monitor the progress of this operation and show it in a progress bar? (e.g. Does the fill() raise progress events?
Start Free Trial