Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a recordset 1

Status
Not open for further replies.

paultervit

Programmer
Apr 24, 2003
3
0
0
GB
I'm trying to create a recordset, not associated with any database. Is this possible. I want to create a recordset that will be filled from an array I have created. I guess I need to define the columns etc. Is this possible.

Thanks

Paul
 
Absolutley... You can look up Disconnected Recordset in MSDN.

Here is a start though. Reference ADO in your project.
[tt]
Public Function CreateEmptyRecordSet() as ADODB.Recordset
Dim rs as ADODB.Recordset
Set rs = New ADODB.Recordset

With rs
.Fields.Append "ID", adInteger, , adFldKeyColumn
.Fields.Append "Name", adVarWChar, 32, adFldIsNullable
.Open
End With
Set CreateEmptyRecordSet = rs
Set rs = Nothing
End Function
[/tt]

Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
Dear paultervit

Yes I think this is possible, please read some help for creating recordset. At now I do'nt have any code and will take some time to write this. I will paste it here tomorrow.

Best Regards
Mahesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top