Recordset without attaching to databases 
Author Message
 Recordset without attaching to databases

Hi all!

I want to create a matrix to hold some values, i can use a multidimensional
array to handle it, but isn't it better to add the values to recordset and
then you can sort, find and filter easier?, is it possible? (i use that
method with Powerbuilder and External Datawindows), which is the best
approach to do it with VB dlls?

thanks in advance,

Geoffrey



Tue, 14 Jan 2003 03:00:00 GMT  
 Recordset without attaching to databases

create your own recordset without attaching to the database
example

public function MakeData () as recordset

dim rs as recordset
set rs = new recordset

With rs

.fields.append "Name", adBSTR
.fields.append "BirthDate", adDate
.open
.addnew
.fields ("Name") = "Fred"
.fields ("BirthDate") = "1/1/00"
.update

.addnew
.fields ("Name") = "Mary"
.fields ("BirthDate") = "1/1/00"
.update

end With

Set MakeData = rs

Set rs = Nothing

End Function


Quote:
> Hi all!

> I want to create a matrix to hold some values, i can use a
multidimensional
> array to handle it, but isn't it better to add the values to recordset and
> then you can sort, find and filter easier?, is it possible? (i use that
> method with Powerbuilder and External Datawindows), which is the best
> approach to do it with VB dlls?

> thanks in advance,

> Geoffrey



Tue, 14 Jan 2003 03:00:00 GMT  
 Recordset without attaching to databases
The solution might be to use a ADO disconnected recordset. It can do the
stuff for you.

cj


Quote:
> Hi all!

> I want to create a matrix to hold some values, i can use a
multidimensional
> array to handle it, but isn't it better to add the values to recordset and
> then you can sort, find and filter easier?, is it possible? (i use that
> method with Powerbuilder and External Datawindows), which is the best
> approach to do it with VB dlls?

> thanks in advance,

> Geoffrey



Wed, 15 Jan 2003 03:00:00 GMT  
 Recordset without attaching to databases

Hi,

A disconnected recordset is not a lot more than a FLAT table with indexes,
since you loose any RELATIONSHIP or other attributions and interactions that
brought you the DATABASE connection. Such a beast can also be contained into
a multimap structure, also known as a Dictionary in VB, and you don't have
then the LIMITS of a recordset. The dictionaries are not native, you have to
include a reference to the runtime Scripting library. In the contrary of
collections, you can change the values and retrieve data not only through
the use of the key.

Hoping it may help,
Vanderghast, Access MVP


Quote:
> Hi all!

> I want to create a matrix to hold some values, i can use a
multidimensional
> array to handle it, but isn't it better to add the values to recordset and
> then you can sort, find and filter easier?, is it possible? (i use that
> method with Powerbuilder and External Datawindows), which is the best
> approach to do it with VB dlls?

> thanks in advance,

> Geoffrey



Fri, 17 Jan 2003 03:00:00 GMT  
 Recordset without attaching to databases
The correct term for what Geoffrey is looking for is a "fabricated" or
"createable" recordset.  Disconnected recordsets were originally derived
from a data provider like ODBC or OLE DB.  They have a lot of overhead to
help with concurrency in the event the user reconnects and wants to do an
UpdateBatch.

Fabricated recordsets are based on client side cursors and became available
with ADO 2.0 and above.  They are quite sophisticated data strucutres but do
have a lot of overhead also.

Phil Hummel


Quote:
> The solution might be to use a ADO disconnected recordset. It can do the
> stuff for you.

> cj



> > Hi all!

> > I want to create a matrix to hold some values, i can use a
> multidimensional
> > array to handle it, but isn't it better to add the values to recordset
and
> > then you can sort, find and filter easier?, is it possible? (i use that
> > method with Powerbuilder and External Datawindows), which is the best
> > approach to do it with VB dlls?

> > thanks in advance,

> > Geoffrey



Sat, 18 Jan 2003 03:00:00 GMT  
 Recordset without attaching to databases
Dictionary objects are arrays of name, value pairs.  If you have more than
two "fields" to track, dictionary objects are not useful.  They are very
good for maintaining the local equivalent of a property bag.


Quote:
> Hi,

> A disconnected recordset is not a lot more than a FLAT table with indexes,
> since you loose any RELATIONSHIP or other attributions and interactions
that
> brought you the DATABASE connection. Such a beast can also be contained
into
> a multimap structure, also known as a Dictionary in VB, and you don't have
> then the LIMITS of a recordset. The dictionaries are not native, you have
to
> include a reference to the runtime Scripting library. In the contrary of
> collections, you can change the values and retrieve data not only through
> the use of the key.

> Hoping it may help,
> Vanderghast, Access MVP



> > Hi all!

> > I want to create a matrix to hold some values, i can use a
> multidimensional
> > array to handle it, but isn't it better to add the values to recordset
and
> > then you can sort, find and filter easier?, is it possible? (i use that
> > method with Powerbuilder and External Datawindows), which is the best
> > approach to do it with VB dlls?

> > thanks in advance,

> > Geoffrey



Sat, 18 Jan 2003 03:00:00 GMT  
 Recordset without attaching to databases

Hi,

True. Furthermore, it is hard to have an AND condition involving two columns
with a dictionnary. Note that the best stuff would be to have a
Table_in_memory on which you can apply some SQL statements (eventually
involving more than one table), but that's not available. So, next best
thing, for versatility, is probably a recordset or a UDT. There was an
article "ADO Unplugged", in Visual Basic Developer (August 1999) with
interesting timings (available on MSDN Library CD#3).

Vanderghast, Access MVP


Quote:
> Dictionary objects are arrays of name, value pairs.  If you have more than
> two "fields" to track, dictionary objects are not useful.  They are very
> good for maintaining the local equivalent of a property bag.



> > Hi,

> > A disconnected recordset is not a lot more than a FLAT table with
indexes,
> > since you loose any RELATIONSHIP or other attributions and interactions
> that
> > brought you the DATABASE connection. Such a beast can also be contained
> into
> > a multimap structure, also known as a Dictionary in VB, and you don't
have
> > then the LIMITS of a recordset. The dictionaries are not native, you
have
> to
> > include a reference to the runtime Scripting library. In the contrary of
> > collections, you can change the values and retrieve data not only
through
> > the use of the key.

> > Hoping it may help,
> > Vanderghast, Access MVP



> > > Hi all!

> > > I want to create a matrix to hold some values, i can use a
> > multidimensional
> > > array to handle it, but isn't it better to add the values to recordset
> and
> > > then you can sort, find and filter easier?, is it possible? (i use
that
> > > method with Powerbuilder and External Datawindows), which is the best
> > > approach to do it with VB dlls?

> > > thanks in advance,

> > > Geoffrey



Tue, 21 Jan 2003 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Deleting records from a recordset without deleting from the database

2. Deleting records from a recordset without effecting the database

3. Get recordsets --without-- blocking the database !!!

4. Create Recordset without a Database ?

5. Disconnected recordset without a database?

6. recordset inserts/deletes without changing database

7. Can I: Recordset without a Database ?

8. unable to attach .jpg without .dat appended to file name

9. Using without *mdb attached

10. urgent .. attach recordset to chart / pivot tble

11. Open recordset doesn't work (see attached file)

12. Help: recordset attached to data control is read-only

 

 
Powered by phpBB® Forum Software