Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > How can i query a ADO-Recordset with SQL?


Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2003, 01:52 AM
Atze Atze is offline
Regular
 
Join Date: Jul 2003
Posts: 85
Default How can i query a ADO-Recordset with SQL?


Hi folks!

This is my first post to this brilliant board.

I've a question which is for a long time in my head, and right now i remembered this topic and asked myself if here would be somebody who can help me, or has an idea.

Following situation is given:
I filled an ADO-recordset with some data.
This has been done 'on-the-fly' by some codes. So the data is not existing in any database. It's only in my recordset.

Now i want to use a SQL-Statement to query this data.
One solution i found was that i stored this data in a access-mdb-table and then i could query it.
But this solution caused that i must create files during runtime, what i don't like.
I want to have it just 'in-memory'.

Why i need a SQL-Statment?
For example for grouping the result and having flexible possibilities.

Is there a possibility for this?
Reply With Quote
  #2  
Old 07-26-2003, 04:48 AM
Shurik12 Shurik12 is offline
Steppe Walker

Retired Moderator
* Expert *
 
Join Date: Jul 2002
Location: Ukraine/Russia/Belgium
Posts: 7,227
Default

Hi,

Unfortunately you can't include a reordset into an sql query.
If for some reasons you don't want create intermediary tables
you could try to write everything in 'one shot', altough wrting such ans sql can be a challenge.

By the way other databases (think of MS SQL and Oracle for example)
have Views and Temporary Table- kind of thing which could come in handy in your case.

And as for your question
>Why i need a SQL-Statment?

The answer is: probably because this language is most suited for these
kind of tasks (no doubts you can achieve the same by using other means
but it would take you more time)

Regards,
Shurik.
Reply With Quote
  #3  
Old 07-27-2003, 07:06 AM
Atze Atze is offline
Regular
 
Join Date: Jul 2003
Posts: 85
Default

Thx for your reply Shurik12.

Overall i come to the conclusion now, that my problem will only work with physical tables.
Thats how i did it in the past, but i thought that maybe there is another idea somewhere around, what i didn't have seen.

The usage of a SQL-server would not be handy in my case, because it should be a small stand-alone tool.

And my question "Why i need a SQL-Statment?" was not really a question.
It was just a rethoric one, to explain why i want to use a SQL-Statement. But thx for your answer

Regards,
Atze
Reply With Quote
  #4  
Old 07-27-2003, 10:04 AM
VBBrazil VBBrazil is offline
Banned
 
Join Date: Mar 2003
Posts: 555
Default

Just for clearify something.
Even for a small stand-alone tool, you can use MSSQL in its lite version called MSDE, that is full working and compatible with MSSQL and is free to use.
Reply With Quote
  #5  
Old 07-27-2003, 12:44 PM
Atze Atze is offline
Regular
 
Join Date: Jul 2003
Posts: 85
Default

@VBBrazil:
Yes, i know about this possibility.
But i especially search for a 'in memory' solution.

I thought that maybe there is something like a wrapper so that i can use the RS as a source for building a new RS with SQL.

Greetings,

Atze
Reply With Quote
  #6  
Old 08-28-2003, 02:26 PM
Atze Atze is offline
Regular
 
Join Date: Jul 2003
Posts: 85
Default

Hmm, there really seems to be no solution to make a Recordset to the source of a SQL-query...?
Reply With Quote
  #7  
Old 07-20-2005, 05:29 AM
Atze Atze is offline
Regular
 
Join Date: Jul 2003
Posts: 85
Default

Time has gone by...

Maybe meanwhile there is a solution for this 'topic'?

Or maybe somebody knows, if there is such a possibility in ADO.NET?
Reply With Quote
  #8  
Old 07-20-2005, 06:04 AM
Shurik12 Shurik12 is offline
Steppe Walker

Retired Moderator
* Expert *
 
Join Date: Jul 2002
Location: Ukraine/Russia/Belgium
Posts: 7,227
Default

I'm afraid not.
__________________
"A diaper is not like a computer that makes satisfying burbling noises from time to time, hinting at great inner complexity." Malcolm Gladwell

"I'm sitting here completely surrounded by no beer." Onslow, 'Keeping up appearances'
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
recordset not receiveing any values from SQL query sunspirits Database and Reporting 6 06-17-2003 02:54 PM
SQL / ADO - Recordset not Updating ebtsup Database and Reporting 2 04-19-2003 09:08 AM
Problem with writing Twice Renidrag Web Programming 20 11-07-2002 02:52 PM
Creating Access Databases TomGuy Database and Reporting 8 07-10-2002 10:56 AM
How to compare an empty value in a query.. pragash Database and Reporting 1 10-22-2001 11:12 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->