G
Guest
Is there a way of uploading text files with columns of data (eg., column one is Account Number, column two is Amount) to the Database using ADO.NET? Eg. I want to do something similar to below code that I do with Excel
'Code to open the file here
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:\CoopMetrics\test.xls';Extended Properties=Excel 8.0;
'Now using the OledbDataAdapter you can query the excel sheet
Dim myDataset As New DataSe
Dim myData As New OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn
myData.TableMappings.Add("Table", "ExcelTest"
myData.Fill(myDataset
Thanks for info.
'Code to open the file here
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:\CoopMetrics\test.xls';Extended Properties=Excel 8.0;
'Now using the OledbDataAdapter you can query the excel sheet
Dim myDataset As New DataSe
Dim myData As New OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn
myData.TableMappings.Add("Table", "ExcelTest"
myData.Fill(myDataset
Thanks for info.