PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Text data provider
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Text data provider
![]() |
Text data provider |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
In ODBC and ADO there was the capability to open delimited (tab etc.) text files. Is there the same capability with ADO.NET and can someone point me to some relevant documentation/examples?
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Check out the Text provider http://www.connectionstrings.com
HTH, Bill -- W.G. Ryan MVP Windows - Embedded www.devbuzz.com www.knowdotnet.com http://www.msmvps.com/williamryan/ "Greg" <anonymous@discussions.microsoft.com> wrote in message news:2CA13BD0-387B-43B6-9880-6EC8FA36310B@microsoft.com... > In ODBC and ADO there was the capability to open delimited (tab etc.) text files. Is there the same capability with ADO.NET and can someone point me to some relevant documentation/examples? |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hi,
Yes, this is the same in .NET, but I would suggest to use OLEDB JET provider instead of text driver to read from the text files. Here is an example (in VB6 but idea is the same and connection string will be the same in .NET) http://support.microsoft.com/defaul...548&Product=ado -- Val Mazur Microsoft MVP "Greg" <anonymous@discussions.microsoft.com> wrote in message news:2CA13BD0-387B-43B6-9880-6EC8FA36310B@microsoft.com... > In ODBC and ADO there was the capability to open delimited (tab etc.) text > files. Is there the same capability with ADO.NET and can someone point me > to some relevant documentation/examples? |
|
|
|
#4 |
|
Guest
Posts: n/a
|
On Thu, 20 May 2004 15:56:05 -0700, "Greg" <anonymous@discussions.microsoft.com> wrote:
¤ In ODBC and ADO there was the capability to open delimited (tab etc.) text files. Is there the same capability with ADO.NET and can someone point me to some relevant documentation/examples? Below is an ADO.NET example using the Jet OLEDB provider: Dim ConnectionString As String Dim SQLString As String ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=e:\My Documents\TextFiles;" & _ "Extended Properties=""Text;HDR=NO;""" SQLString = "Select * from TextFile.csv" Dim ConnectionText As New OleDb.OleDbConnection ConnectionText.ConnectionString = ConnectionString ConnectionText.Open() Dim AdapterText As New OleDb.OleDbDataAdapter(SQLString, ConnectionText) Dim DataSetText As New DataSet("TextFiles") AdapterText.Fill(DataSetText, "TextFile") DataGrid1.SetDataBinding(DataSetText, "TextFile") ConnectionText.Close() Paul ~~~ pclement@ameritech.net Microsoft MVP (Visual Basic) |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

