PC Review


Reply
Thread Tools Rate Thread

Text data provider

 
 
=?Utf-8?B?R3JlZw==?=
Guest
Posts: n/a
 
      21st May 2004
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?
 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      21st May 2004
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" <(E-Mail Removed)> wrote in message
news:2CA13BD0-387B-43B6-9880-(E-Mail Removed)...
> 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?


 
Reply With Quote
 
Val Mazur
Guest
Posts: n/a
 
      21st May 2004
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/default...48&Product=ado

--
Val Mazur
Microsoft MVP


"Greg" <(E-Mail Removed)> wrote in message
news:2CA13BD0-387B-43B6-9880-(E-Mail Removed)...
> 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?



 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      24th May 2004
On Thu, 20 May 2004 15:56:05 -0700, "Greg" <(E-Mail Removed)> 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 ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLSummit .NET data provider list (other data access middleware lists) knorth Microsoft ADO .NET 0 29th Oct 2006 09:12 AM
The .Net Data OLE DB Provider(System.Data.OleDb) requires Microsoft Data Access Components(MDAC) version 2.6 or later. sanjay prasad Microsoft ADO .NET 1 22nd Sep 2006 02:45 AM
Provider independent data access: creating a data adapter from aconnection Harold Howe Microsoft ADO .NET 0 31st May 2006 11:10 PM
Reading data from text files using oledb provider Jomon Mathew Microsoft Dot NET 1 30th Mar 2004 07:07 PM
Oracle Data Provider for .NET: Data provider internal error(-3000) Heidi Hundåla Microsoft ADO .NET 1 29th Oct 2003 03:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:02 AM.