Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Cursors(Urgent)
Message
 
To
17/01/2000 12:15:19
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00319046
Message ID:
00319061
Views:
13
> I am doing a project in VB 6.0. In that I want to create
>a temp cursor for storing some data. Is there any method in
>VB for creating temp table(not a physical table)i.e. I want
>to create a table in memory like cursor as we create in
>VFP using Create Cursor method.
> Another I want to create a form using Create Form method.
>But, I don't want to create any instance of the existing form
>Istead of that I want to create a new form using the above
>method.

You can now (using ADO) build completly in memory recordset. See this code snippet:

Dim rstMemory As ADODB.Recordset

'========================================================================
'Create an in memory recordset to build the view for the grid
'========================================================================
Set rstMemory = New ADODB.Recordset
With rstMemory
.CursorLocation = adUseClient
.LockType = adLockPessimistic
.Fields.Append "Entité", adVarChar, 50
.Fields.Append "EntityCode", adVarChar, 50
.Fields.Append "Total " & strLast, adDouble
.Fields.Append rstTemp!Long_Nom, adDouble
.Open
End With

Once opened, the recordset can be use like any regular recordset. You can use any method (Update, Delete, Find, Filter, Save, ...).
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform