[thelist] Weird Data from Text File: 
Casey Crookston
caseyb at thecrookstons.com
Mon Mar 10 22:44:08 CDT 2008
Hey there, I'm seeing something really odd in a pretty simple select I'm
doing out of a comma delimited text file:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim TextConn As New
System.Data.OleDb.OleDbConnection(WebConfigurationManager.ConnectionStrings("ImportCats").ConnectionString)
Dim daSource As New System.Data.OleDb.OleDbDataAdapter("SELECT * FROM
cats.txt", TextConn)
daSource.AcceptChangesDuringFill = False
Dim dtSource As DataTable = New DataTable
daSource.Fill(dtSource)
GridView1.DataSource = dtSource
GridView1.DataBind()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In web.config:
<add name="ImportCats"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\xxxxxxx\scripts\;Extended
Properties='Text;HDR=Yes;FMT=Delimited;'" />
To see why the data was not importing into the DB, I outputed the the
datatable to the screen in the gridview you see above. Here is what I saw
for the first column's name:
Advertiser
I have NO idea where the  is coming from! It most certainly is not in
the text file!!!
Any ideas?
Thanks,
Casey
More information about the thelist
mailing list