Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a client side recordset from an ADO command object
Message
De
29/11/2000 11:18:27
Jorge Haro
Independent Consultant
Juarez, Mexique
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Returning a client side recordset from an ADO command object
Divers
Thread ID:
00446804
Message ID:
00446804
Vues:
40
It can be done right?, I'm getting server side recordsets regrdless of how I set up the recordset, it's an SQL Server 6.5 stored procedure btw, let me know if you need to see the stored procedure's code, this is the VFP code:
#include adovfp.h

clear

public oConnection, oCommand, oRecordSet

oConnection = CreateObject("adodb.connection")
oCommand = CreateObject("adodb.command")

oConnection.Open("SVEIN","sa","")

With oCommand
   	.ActiveConnection = oConnection
   	.CommandText = "ITEMSPERCLASS"
	.CommandType = adCmdText
EndWith

oClassParameter = oCommand.CreateParameter( "@pnClassID" , adInteger , adParamInput , 4 , 45 )

oClassParameter = CreateObject("adodb.parameter")

With oClassParameter
   .Name = "@pnClassID"
   .Type = adInteger
   .Direction = adParamInput
   .Value = 45
EndWith

oCommand.Parameters.Append(oClassParameter)

With oClassParameter
   .Value = 45
EndWith

oRecordSet = createobject("adodb.recordset")

with oRecordSet

   	.CursorLocation = adUseClient
   	.LockType = adLockBatchOptimistic
	.CursorType = adOpenStatic

EndWith

oRecordset = oCommand.Execute

?oRecordSet.RecordCount && Prints -1 
?oRecordSet.CursorLocation && Prints 2, ADUSESERVER
TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform