unique index for recordset created in memory

G

Guest

Hi,

I try to create a recordset in memory using below code.
The problem is I can not create a unique index to prevent duplicate
Primary Key for "Field1"+"Field2".
Any ideas is welcome.


----------------------------------------------------------------------

Set rs = New ADODB.Recordset
With rs.Fields
.Append "Field1", adVarChar, 255
.Append "Field2", adVarChar, 255
.Append "Field3", adVarChar, 255
End With
rs.Open


-----------------------------------------------------------------------


HELP!

Thanks

Jeerakarn W.
 
M

Michel Walsh

Hi,


I am afraid that a disconnected recordset is far from being a table. At
most, you could create something like an "index" (through the
Properties("Optimize")= true ), but I never tried it myself. Why not using a
local database, rather than a disconnected recordset?



Hoping it may help,
Vanderghast, Access MVP



Hi,

I try to create a recordset in memory using below code.
The problem is I can not create a unique index to prevent duplicate
Primary Key for "Field1"+"Field2".
Any ideas is welcome.


----------------------------------------------------------------------

Set rs = New ADODB.Recordset
With rs.Fields
.Append "Field1", adVarChar, 255
.Append "Field2", adVarChar, 255
.Append "Field3", adVarChar, 255
End With
rs.Open


-----------------------------------------------------------------------


HELP!

Thanks

Jeerakarn W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top