I think I already know the answer ("NO"), but I figured I'd ask anyway:
Is there a way to populate a SQL-like object entirely in memory, without
having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?
I'd like to take the contents of some CSV's and dump them into a virtual
SQL table, and then call from that table using a SQL statement ("SELECT *
FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a
data-grid to do basically that, but I was wondering if there was a classic
ASP solution. More of a curiosity than any pressing need.
Regards,
Scott 10 1600
You can't use XML or files either?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16... I think I already know the answer ("NO"), but I figured I'd ask anyway:
Is there a way to populate a SQL-like object entirely in memory, without having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?
I'd like to take the contents of some CSV's and dump them into a virtual SQL table, and then call from that table using a SQL statement ("SELECT * FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a data-grid to do basically that, but I was wondering if there was a classic ASP solution. More of a curiosity than any pressing need.
Regards, Scott
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in news:O5TMx$MoEHA.800
@TK2MSFTNGP14.phx.gbl: You can't use XML or files either?
Sure I could; it was more a point of curiosity than anything else. I'm
tons more familiar with straight SQL than I am with XML, which is why I'd
asked about SQL-friendly memory-resident tables.
Ahh... then afaik the answer is nope.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16... "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in news:O5TMx$MoEHA.800 @TK2MSFTNGP14.phx.gbl:
You can't use XML or files either?
Sure I could; it was more a point of curiosity than anything else. I'm tons more familiar with straight SQL than I am with XML, which is why I'd asked about SQL-friendly memory-resident tables.
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16... I think I already know the answer ("NO"), but I figured I'd ask anyway:
Is there a way to populate a SQL-like object entirely in memory, without having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?
I'd like to take the contents of some CSV's and dump them into a virtual SQL table, and then call from that table using a SQL statement ("SELECT * FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a data-grid to do basically that, but I was wondering if there was a classic ASP solution. More of a curiosity than any pressing need.
Regards, Scott
Here's an idea:
1. Persist an empty recordset of the table in question to a file using
ADODB.Recordset.Save
2. On ASP.Application.Start, load the persisted file into an
MSXML2.FreeThreadedDOMDocument30 object and store that object in the
Application scope. This is the exception to the rule. Normally, storing
objects in the Application/Session scope is not a good idea.
3. As needed, open an ADODB.Recordset object, specifying as the source, the
IStream interface implemented by the MSXML2.FreeThreadedDOMDocument30
object.
4. Do stuff with the recordset.
5. Close and deallocate recordset.
I'm sure there's a way to do this without recordsets, using only connection
objects, but I'll leave that as an exercise for the reader. This method also
presents some interesting possibilities. For instance, you could opt to use
XPath expressions instead of SQL/Recordset.Filter to query data. An of
course since the data is already in XML format, transforming hierarchical
data become a much simpler affair.
"Is there a way to populate a SQL-like object entirely in memory"
sql is a query language so it cant store anything. if you mean a recordset
like object, then yes you can.
just create and use a disconnected recordset.
dim rs : set rs = createobject("adodb.recordset")
rs.cursorlocation = 3
rs.cursortype = 3
rs.fields.append "field1",200,255,&H00000020
rs.fields.append "field2",200,255,&H00000020
rs.open
rs.addnew
rs.fields("field1") = "bob"
rs.fields("field2") = "smith"
rs.update
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16... I think I already know the answer ("NO"), but I figured I'd ask anyway:
Is there a way to populate a SQL-like object entirely in memory, without having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?
I'd like to take the contents of some CSV's and dump them into a virtual SQL table, and then call from that table using a SQL statement ("SELECT * FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a data-grid to do basically that, but I was wondering if there was a classic ASP solution. More of a curiosity than any pressing need.
Regards, Scott
Only store ADO objects in Application or Session if you've made the registry
change to cause them to be created free-threaded. This is not recommended if
using Access on the server. http://www.aspfaq.com/show.asp?id=2053
Bob Barrows
thorpe wrote: "Is there a way to populate a SQL-like object entirely in memory"
sql is a query language so it cant store anything. if you mean a recordset like object, then yes you can.
just create and use a disconnected recordset.
dim rs : set rs = createobject("adodb.recordset") rs.cursorlocation = 3 rs.cursortype = 3 rs.fields.append "field1",200,255,&H00000020 rs.fields.append "field2",200,255,&H00000020 rs.open rs.addnew rs.fields("field1") = "bob" rs.fields("field2") = "smith" rs.update
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message news:Xn*******************@207.46.248.16... I think I already know the answer ("NO"), but I figured I'd ask anyway:
Is there a way to populate a SQL-like object entirely in memory, without having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?
I'd like to take the contents of some CSV's and dump them into a virtual SQL table, and then call from that table using a SQL statement ("SELECT * FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a data-grid to do basically that, but I was wondering if there was a classic ASP solution. More of a curiosity than any pressing need.
Regards, Scott
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
who said anything about storing it in an application or session? :P
"Bob Barrows [MVP]" wrote: Only store ADO objects in Application or Session if you've made the registry change to cause them to be created free-threaded. This is not recommended if using Access on the server.
http://www.aspfaq.com/show.asp?id=2053
Bob Barrows thorpe wrote: "Is there a way to populate a SQL-like object entirely in memory"
sql is a query language so it cant store anything. if you mean a recordset like object, then yes you can.
just create and use a disconnected recordset.
dim rs : set rs = createobject("adodb.recordset") rs.cursorlocation = 3 rs.cursortype = 3 rs.fields.append "field1",200,255,&H00000020 rs.fields.append "field2",200,255,&H00000020 rs.open rs.addnew rs.fields("field1") = "bob" rs.fields("field2") = "smith" rs.update
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message news:Xn*******************@207.46.248.16... I think I already know the answer ("NO"), but I figured I'd ask anyway:
Is there a way to populate a SQL-like object entirely in memory, without having to save it in a SQL-like environment like MySQL, MS-SQL, or Access?
I'd like to take the contents of some CSV's and dump them into a virtual SQL table, and then call from that table using a SQL statement ("SELECT * FROM VirtualTable WHERE Foo='Bar'"). I know that in .NET I could use a data-grid to do basically that, but I was wondering if there was a classic ASP solution. More of a curiosity than any pressing need.
Regards, Scott
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
You're right. I thought that's what the original poster meant by
"in-memory", but a quick re-read reveals that may have been a wrong
assumption (despite the fact that other responders in this thread also made
that assumption)
Bob Barrows
thorpe wrote: who said anything about storing it in an application or session? :P
"Bob Barrows [MVP]" wrote:
Only store ADO objects in Application or Session if you've made the registry change to cause them to be created free-threaded. This is not recommended if using Access on the server.
http://www.aspfaq.com/show.asp?id=2053
Bob Barrows thorpe wrote: "Is there a way to populate a SQL-like object entirely in memory"
sql is a query language so it cant store anything. if you mean a recordset like object, then yes you can.
just create and use a disconnected recordset.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in
news:uJ**************@TK2MSFTNGP11.phx.gbl: You're right. I thought that's what the original poster meant by "in-memory", but a quick re-read reveals that may have been a wrong assumption (despite the fact that other responders in this thread also made that assumption)
Correct; by "in-memory", I meant basically a scratch table that resides in
memory for the scope of the current page, not one that would be kept alive
from page to page. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Frank Esser |
last post by:
I am using SQL 8 Personal edition with sp2 applied. I set the max
server memory to 32MB and leave the min server memory at 0. When my
application starts hitting the database hard the memory usage...
|
by: Franklin Lee |
last post by:
Hi All,
I use new to allocate some memory,even I doesn't use delete to release them.
When my Application exit, OS will release them.
Am I right?
If I'm right, how about Thread especally on...
|
by: Jeremy |
last post by:
Hi all,
I'm getting very confused about how DB2 uses shared memory and I
wonder if someone could clarify matters for me, please ?
We are running 32bit DB2 V7.2 FP9 under AIX 4.3.3 on a machine...
|
by: Alessandro Monopoli |
last post by:
Hi all,
I'm searching a PORTABLE way to get the available and total physical memory.
Something like "getTotalMemory" and it returns the memory installed on my PC
in bytes, and...
|
by: ranjeet.gupta |
last post by:
Dear All
Is the Root Cause of the Memory corruption is the Memory leak, ??
suppose If in the code there is Memory leak, Do this may lead to the
Memory Corruption while executing the program ?
...
|
by: James |
last post by:
The following code will create memory leaks!!!
using System;
using System.Diagnostics;
using System.Data;
using System.Data.SqlClient;
namespace MemoryLeak
|
by: frederic.pica |
last post by:
Greets,
I've some troubles getting my memory freed by python, how can I force
it to release the memory ?
I've tried del and gc.collect() with no success.
Here is a code sample, parsing an XML...
|
by: Ilias Lazaridis |
last post by:
How to detect memory leaks of python programms, which run in an
environment like this:
* Suse Linux 9.3
* Apache
* mod_python
The problem occoured after some updates on the infrastructure....
|
by: Jean-Paul Calderone |
last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote:
The test doesn't demonstrate any leaks. It does demonstrate that memory
usage can remain at or near peak memory usage even after...
|
by: cham |
last post by:
Hi,
I am working on c++ in a linux system ( Fedora core 4 ),
kernel version - 2.6.11-1.1369_FC4
gcc version - 4.0.0 20050519 ( Red Hat 4.0.0-8 )
In my code i am creating a vector to store...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |