Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2004, 12:44 PM
Authorized User
 
Join Date: Mar 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating Unopened Recordset

Does any one know how to create a recordset with out actuall opening it?

I have dimmed, instantiated (set myrec = new adodb.recordset) but I can't seem use it because of a "Recordset Not Opened" error. How do I open it with out passing a sql or source database.

John P.

John Pennington
 
United Parcel Service
w(404) 828 6934
c (770) 714 5975
__________________
John Pennington
 
United Parcel Service
w(404) 828 6934
c (770) 714 5975
 
Old April 2nd, 2004, 04:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm assuming you want to use a recordset as a container for your data, but without it being associated with any data source? If so what you need to do is first add some fields to it, using rs.Fields.Append("Name", Type, Size, Properties) then you can call rs.Open, and finally you add data to it using the AddNew method and then assign values to the fields.

Is that what you're looking for?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Clone DAO Recordset into ADO Recordset kamrans74 VB How-To 0 March 6th, 2007 11:57 AM
Query from Recordset into another Recordset kamrans74 Pro VB Databases 5 March 5th, 2007 04:17 PM
error with code creating a recordset [email protected] Access VBA 4 January 23rd, 2007 11:33 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
Convert ADO recordset to DAO recordset andrew_taft Access 1 May 5th, 2004 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.