Re: Fill Dataset from csv file
From: Cowboy \(Gregory A. Beamer\) [MVP] (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 06/30/04
- Next message: William Ryan eMVP: "Re: Multithreaded data access"
- Previous message: William Ryan eMVP: "Re: i'm in dataview hell - please someone help!"
- In reply to: andrei: "Fill Dataset from csv file"
- Next in thread: Paul Clement: "Re: Fill Dataset from csv file"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 30 Jun 2004 08:31:42 -0500
I know of no way with the built in capabilities of ADO .NET (will have to
think some more on the problem, as there may be a way). You can use stream
objects to get at the data, but you will likely have to create the arrays to
load it into a DataTable and load each row yourself. You could also load the
CSV into XML (DataSet format) and load in. This can be done from a stream
object, if I remember correctly, but you are still cursing through every row
to set this up.
The issue is this. The ADO .NET providers are set up to pull from a
persistent store, whether it is a database server or a file. There is an
overload to deserilize,
DataSet Constructor (SerializationInfo, StreamingContext), but it is an
internal method. You still end up with a lot of building if you use this
(which is not recommended).
If you temporarily save off the file, you can consume using ADO .NET, which
is simpler. This is not what you desire, however.
-- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA ************************************************ Think Outside the Box! ************************************************ "andrei" <andrei.toma@era-environmental.com> wrote in message news:OKEmMEqXEHA.384@TK2MSFTNGP10.phx.gbl... > Hi Group, > > I need to fill a dataset from a csv file. The issue is that the file is > already loaded in memory > I'm using an asp.net application to upload a csv file from the user, so > after submitting, the file is uploaded in the server's memory. > I don't want to have to save the file on the disk before accessing it. > > Is there any way of loading a dataset this way, directly from memory ? > > Thank you for any ideas ! > > Andrei. > >
- Next message: William Ryan eMVP: "Re: Multithreaded data access"
- Previous message: William Ryan eMVP: "Re: i'm in dataview hell - please someone help!"
- In reply to: andrei: "Fill Dataset from csv file"
- Next in thread: Paul Clement: "Re: Fill Dataset from csv file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|