Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Return a Record set to the Calling Program
Message
De
10/02/2004 19:51:50
 
 
À
10/02/2004 18:50:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00875450
Message ID:
00876096
Vues:
18
Hi,
Take a look at VFPCOM ultility.

Download from http://www.microsoft.com/downloads/release.asp?releaseid=33988&area=search&ordinal=1

Sample Code:
CursorToRS( )

Converts an existing Visual FoxPro data cursor (specified in workarea) to an ADO recordset.

Syntax

CursorToRS(oRecordSet [, cTableAlias | nWorkArea] [, lNoData ])

Arguments

oRecordSet - the object reference to the ADO recordset. This is required.

cTableAlias - the alias of the table or cursor from which data is migrated to the ADO recordset.

nWorkArea - the work area number of the table or cursor from which data is migrated to the ADO recordset.

lNoData - if you want to create a recordset with only structure and no data, set this value to .T.

Remarks

· CURSORTORS() returns 0 if successful.

· General fields are not supported by this method.

· If you specify no TableAlias or WorkArea, the method will default to the current workarea.

· The method will overwrite any existing recordset contents. If you want to append data, append to cursor first.

· If no cursor exists in the specified workarea, nothing happens (i.e., no change is made to the existing ADO recordset structure or contents).

Example

#DEFINE C_VFPCOMCLASS 'vfpcom.comutil'
oVFPCOM = CreateObject(C_VFPCOMCLASS)
SELECT * FROM cTableName INTO CURSOR foo
oRecordSet=CreateObject('ADODB.RECORDSET')
nError = oVFPCOM.CURSORTORS(oRecordSet)
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform