Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default In Memory Recordset Without Creating Database

Hi
I just want to create a Recordset from the rows in an excel sheet but
without creating a database on the disk. Is this possible either in DAO or
ADO?
I want to do this so that I can query the data more easily.
Alok


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default In Memory Recordset Without Creating Database

It would be, but apparently there is a memory leak when doing this with ADO
(I don't know about DAO, but that might work).

For ADO, you can do a SavecopyAs and then access that workbook if all you
are doing is read only type queries.

See Mr. Erlandsen's site for sample code for ADO and DAO:

http://www.erlandsendata.no/english/...php?t=envbadac

--
Regards,
Tom Ogilvy

"Alok Joshi" wrote in message
...
Hi
I just want to create a Recordset from the rows in an excel sheet but
without creating a database on the disk. Is this possible either in DAO or
ADO?
I want to do this so that I can query the data more easily.
Alok




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default In Memory Recordset Without Creating Database

Thank you very much. I hold you in great esteem and regard for helping
in these newsgroups with your vast knoledge and expertise.

"Tom Ogilvy" wrote in message ...
It would be, but apparently there is a memory leak when doing this with ADO
(I don't know about DAO, but that might work).

For ADO, you can do a SavecopyAs and then access that workbook if all you
are doing is read only type queries.

See Mr. Erlandsen's site for sample code for ADO and DAO:

http://www.erlandsendata.no/english/...php?t=envbadac

--
Regards,
Tom Ogilvy

"Alok Joshi" wrote in message
...
Hi
I just want to create a Recordset from the rows in an excel sheet but
without creating a database on the disk. Is this possible either in DAO or
ADO?
I want to do this so that I can query the data more easily.
Alok


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default In Memory Recordset Without Creating Database

"Tom Ogilvy" wrote ...

It would be, but apparently there is a memory leak when doing this with ADO
(I don't know about DAO, but that might work).

For ADO, you can do a SavecopyAs and then access that workbook if all you
are doing is read only type queries.

See Mr. Erlandsen's site for sample code for ADO and DAO:

http://www.erlandsendata.no/english/...php?t=envbadac


There doesn't appear to be code for the workaround at this famous
site, so try this:

http://groups.google.com/groups?selm...g .google.com

Another option is to fabricate a disconnected recordset i.e. create
your own fields and data e.g.

Option Explicit
Sub test()
Dim rs As Object
Set rs = CreateObject("ADODB.Recordset")
With rs

' Client-side cursor required for
' disconnected recordset
.CursorLocation = 3 ' adUseClient

' Cursor will always be Static for
' client-side recordset
.CursorType = 3 ' adOpenStatic
.LockType = 4 ' adLockBatchOptimistic

' Add field
.Fields.Append _
"Heinz_varieties", 3 ' (adInteger)

.Open

' Manually add data
.AddNew "Heinz_varieties", 57
.UpdateBatch

End With
End Sub

Jamie.

--
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating database help please! deemo85 Excel Discussion (Misc queries) 3 February 14th 10 09:52 PM
Creating a Database in Excel Kevin New Users to Excel 9 September 11th 06 02:11 PM
Type recordset/recordset? FlaviusFlav[_9_] Excel Programming 4 May 24th 04 12:16 PM
creating a database and database query Tim Excel Programming 1 March 5th 04 06:17 PM
Creating small "recordset" or sorting a numeric 1-dim array Anthony Cravero Excel Programming 0 December 19th 03 06:36 PM


All times are GMT +1. The time now is 09:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"