471,627 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

SQL query on in-memory data

Hi
I need to read data from flat files in memory and execute SQL query on
the in-memory data. I do not have an option of using a database and I
am using c# .Net to build my application. Does anyone know whether it
is possible to make SQL query on datasets or on XML data for that
matter. Or is there a third party tool which can help me with this.

thanks
Ajay

Dec 13 '05 #1
7 2535
Well, it's not exactly SQL, but you can take a look at
DataTable.Select().

Arbitrary, SQL-like expressions will be possible in C# 3.0 with LINQ,
but even then you will be writing them in code, rather than parsing a
SQL expression.

Does it have to be a SQL query? Or are you just looking for the same
effect: searchable data?

When you say that you don't have the option to use a database, do you
mean that you can't use a database in any way in your program, or just
that the data is in flat files? If it's the latter, and you really need
to execute true SQL queries, could you not read the information from
the flat files, drop it into SQL Express temporarily, just for the
purposes of your program, and then query it there? Then you could just
delete the database copy when you're done.

Dec 13 '05 #2
"Bruce Wood" wrote:
Well, it's not exactly SQL, but you can take a look at
DataTable.Select().

Arbitrary, SQL-like expressions will be possible in C# 3.0 with LINQ,
but even then you will be writing them in code, rather than parsing a
SQL expression.

Does it have to be a SQL query? Or are you just looking for the same
effect: searchable data?

When you say that you don't have the option to use a database, do you
mean that you can't use a database in any way in your program, or just
that the data is in flat files? If it's the latter, and you really need
to execute true SQL queries, could you not read the information from
the flat files, drop it into SQL Express temporarily, just for the
purposes of your program, and then query it there? Then you could just
delete the database copy when you're done.

that is not a good solution. you should use the ODBC driver to query
against flat files.

Dec 13 '05 #3
Thanks for correcting me. I wasn't aware that ODBC could do that "out
of the box," as it were.

Dec 13 '05 #4
Hi,

Just give a little more details about the files struct

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"ajay" <aj*********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi
I need to read data from flat files in memory and execute SQL query on
the in-memory data. I do not have an option of using a database and I
am using c# .Net to build my application. Does anyone know whether it
is possible to make SQL query on datasets or on XML data for that
matter. Or is there a third party tool which can help me with this.

thanks
Ajay

Dec 13 '05 #5
how is it possible to execute SQL query on a flat database using ODBC?
My queries are mostly for data manipulation (like using dyanamic
queries for creating new fields by making use of existing fields ) , so
plain select functionality of datasets won't at all be sufficient.
Can anybody tell me how can I make use of XQuery ?

rgds

Dec 15 '05 #6
can you write the data to a temp file in CSV format and let ODBC read it?

ajay wrote:
how is it possible to execute SQL query on a flat database using ODBC?
My queries are mostly for data manipulation (like using dyanamic
queries for creating new fields by making use of existing fields ) , so
plain select functionality of datasets won't at all be sufficient.
Can anybody tell me how can I make use of XQuery ?

rgds

Dec 15 '05 #7
well yes doing that won't be a problem if that would enable me to
manipulated data dynamically using the queries.
How do you suggest I can do that?

Dec 15 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mike Cocker | last post: by
1 post views Thread by greg.kujawa | last post: by
3 posts views Thread by Jamie Pittman via AccessMonster.com | last post: by
2 posts views Thread by laredotornado | last post: by
14 posts views Thread by gert | last post: by
20 posts views Thread by Guillaume Dargaud | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.