#INCLUDE ado.h >lcConStr = "Provider=vfpoledb;Data Source="+HOME(2)+"northwind\northwind.dbc" >oCon = CreateObject("ADODB.connection") >oCmd = CreateObject("ADODB.Command") > >oCon.Open(lcConStr) >oCmd.ActiveConnection = oCon >oCmd.CommandType = adCmdStoredProc > >* A Date type parameters >ldBeginning_Date = {^1997/01/01} >ldEnding_Date = {^2100/12/31} >oCmd.CommandText = [SalesByYear(?,?)] >oPar = oCmd.CreateParameter(ldBeginning_Date, ; > adDBDate, adParamInput, , ldBeginning_Date) >oCmd.Parameters.Append(oPar) >oPar = oCmd.CreateParameter(ldEnding_Date, ; > adDBDate, adParamInput, , ldEnding_Date) >oCmd.Parameters.Append(oPar) > >oRs = oCmd.Execute() >The same for one character parameter
>oCmd.CommandText = [CustOrdersOrders(?)] >lcCustomerID = "TOMSP" >oPar = oCmd.CreateParameter(lcCustomerID, ; > adVarChar, adParamInput, LEN(lcCustomerID), lcCustomerID) >oCmd.Parameters.Append(oPar) >oRs = oCmd.Execute() >Can you return VFP cursor using this approach?