compactframework >> download CSV DATAADAPTER

by dassenapathi » Wed, 13 Jul 2005 20:55:41 GMT

hi,
how can i download the CSV DATAADAPTER fronm opennetcf.org , when i tried
in "search" link it displays blank..
i have to develop a application involving text files
since we cant use sqlServerce .

kindly give me the correct URL..

regds


2)another doubt.
i have an xml file(say books.xml , i want to read it , using filestream,
xmltextreader i read the xml file.
and used the
mydataset.readxml(xmltxtrdr)
method for reading.loading into the database.
now if i want to populate the xml file contents ina datagrid, using

datagrid1.datasource=dadaset

the output form, (datagrid) shows blank
any help expected...
regds
Das

compactframework >> download CSV DATAADAPTER

by Alex Feinman [MVP] » Thu, 14 Jul 2005 00:17:18 GMT


If you prefer a separate file (vs. the full framework download), use our
SourceGear vault at http://vault.netcf.tv/VaultService/VaultWeb/login.aspx
user: guest
password: guest

--
Alex Feinman
---
Visit http://www.opennetcf.org

Similar Threads

1. Data manipulation from .csv file - testfile.csv (1/1) - testfile1.csv (0/1) - VB.Net

2. Data manipulation from .csv file - testfile.csv (1/1) - testfile1.csv (1/1)

Hi Keith,

    Something like this perhaps..
        Read each line.
        Split it into fields.
        Take action depending on the line type.
        Build up the output line.
        On terminating line type, output the line.

    The following produces an ArrayList of output lines. (But it doesn't do
anything with them)

Regards,
Fergus

<code>
    Public Sub ProcessFile (sFilePath As String)
        Dim sLineIn As String
        Dim asParts As String()
        Dim sLineOut As String
        Dim alLinesOut As New ArrayList

        Dim oStreamReader As New StreamReader (sFilePath)
        sLineIn = oStreamReader.ReadLine
        Do Until sLineIn Is Nothing
            asParts = sLineIn.Split (","c)
            Select Case asParts (0)
                Case "TH": sLineOut = asParts(2) & ", " & _
                            asParts(5) & ", " & asParts(6) & _
                            ", " & asParts(7) & ", "

                Case "RE": sLineOut &= asParts(4) & ", " & _
                            asParts(5) & ", " & asParts(6) & _
                            ", " & asParts(7) & ", " & _
                            asParts(8) & ", " & asParts(9) & ", "

                Case "IL": sLineOut &= asParts(8) & ", "

                Case "TT": alLinesOut.Add (sLineOut)
            End Select
            sLineIn = oStreamReader.ReadLine
        Loop
        oStreamReader.Close
    End Sub

</code>


3. CSV download issue - Asp.Net

4. CSV download from aspx page has corrupt sheet name using MSIE/Excel

Hello,

When I use the follwing aspx code to get a csv file via Internet Explorer in 
MS Excel, after comfirm dialog box as "Open content immediately" Excel 
displays a corrupt worksheet name as given in:


Response.Buffer = True

Response.ClearContent()

Response.ClearHeaders()

Response.Charset = ""

...

Response.AppendHeader("content-length", reportOutput.Length.ToString())

Dim type As String = Request.QueryString("Type")

Dim strFileName As String = Request.Params("FileName")

...
Response.ContentType = "application/csv"

Response.AddHeader("Content-Disposition", 
String.Format("attachment;filename={0}.CSV ", strFileName))

...

Response.AddHeader("Content-Transfer-Encoding", "binary")

Response.BinaryWrite(reportOutput)

Response.Flush()

Response.End()



then the CSV file opens as:

'.CSV]fille_name[1]'

This worksheet name cannot even be edited to eg. 'table_1'. Excel does not 
accept any typing, complaining "wrong characters".

If I write the file to disk instead of opening it in Excel, everything works 
fine when I try to open the saved file afterwards.


I don't have a clue on this... however the HTTP headed looks to come back 
correctly from the server:

HTTP/1.1 200 OK
Date: Thu, 09 Nov 2006 17:01:31 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MicrosoftOfficeWebServer: 5.0_Pub
X-AspNet-Version: 2.0.50727
Content-Length: 7092
Content-Disposition: attachment;filename=Data_Export3732.CSV
Content-Transfer-Encoding: binary
Cache-Control: private
Content-Type: application/vnd.ms-excel


Following the example from this header... the worksheet name will open as 
follows in Excel:

.CSV]Data_Export3732(1)



Thanks for any guide... 


5. Problem downloading csv file - Asp.Net

6. CSV File Download from an ASP.NET page issue

I'm using the following code to stream a CSV file download to the client 
browser -

HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ClearContent(); 
HttpContext.Current.Response.ClearHeaders(); 
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; 
HttpContext.Current.Response.AddHeader( "content-disposition","attachment; 
filename=" + filename ); 
HttpContext.Current.Response.BinaryWrite(bytes); 
HttpContext.Current.Response.End();

(where <filename> is equal to the filename, eg test.csv; and <bytes> is 
equal to a bytearray of the actual CSV data)

Everything is fine and dandy except for one tiny glitch - The "File 
Download" dialog box (the one that asks Save, Open, Cancel, More Info) 
appears twice in succession when you click on Open.  If you click on Save, 
the CSV file is saved ok to the clients machine then the user is prompted to 
Open the file.  If you simply click on Open, the same dialog box immidiately 
reappers and you have to click on Open again to display the file in Excel.

7. how to download "OpenNETCF.Data.CSV"

8. Download CSV file, browser appends brackets