Re: Help copying an array into an ADO recordset
From: Val Mazur (group51a_at_hotmail.com)
Date: 05/26/04
- Next message: Val Mazur: "Re: Joined-Sql Updates/Deletes using updateBatch"
- Previous message: Val Mazur: "Re: ADO 2.6 Installation"
- In reply to: rotor: "Help copying an array into an ADO recordset"
- Next in thread: rotor: "Re: Help copying an array into an ADO recordset"
- Reply: rotor: "Re: Help copying an array into an ADO recordset"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 21:07:28 -0400
Hi,
You could create fabricated recordset using next sort of code
Set loMyRecordset = New ADODB.Recordset
With loMyRecordset.Fields
loMyRecordset.CursorLocation = adUseClient
.Append "MyFieldName1", adInteger
.Append "MyFieldName2", adVarChar, 10, adFldIsNullable
....
loMyRecordset.Open
End With
Now you could populate this recordset as any regular ADO recordset using
AddNew method
-- Val Mazur Microsoft MVP "rotor" <anonymous@discussions.microsoft.com> wrote in message news:2B6C8FE9-5535-4BD6-A216-527C3FBC4DA1@microsoft.com... > Hello, I'm using VBA in Win 2k with Office XP. > > I have an array of data that has been crunched that I would like to copy > into an ADO recordset. I'm not sure where to begin. For instance, can you > just open an empty recordset and then write data into it? How? > > If someone has a function to do this could you please post example VBA > code? I'm presuming that this process is the same regardless of App (i.e. > whether working in Excel or Access?). > > Thanks in advance for the assistance.
- Next message: Val Mazur: "Re: Joined-Sql Updates/Deletes using updateBatch"
- Previous message: Val Mazur: "Re: ADO 2.6 Installation"
- In reply to: rotor: "Help copying an array into an ADO recordset"
- Next in thread: rotor: "Re: Help copying an array into an ADO recordset"
- Reply: rotor: "Re: Help copying an array into an ADO recordset"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|