I have a Cursor in my foxpro as ACPGRN. And I'm trying to get some data from MSSSQL trough the cursor that I created in foxpro like this.
When I run my form I can't get all the records and it comes only the first records. If the first cBatchNo in myACPGRN is 1234 the output of the _BatchValue in 1234.
How can I get all the records to my cursor?
Thank You
Code:
SELECT ACPGRN
SCAN
stra="select MAS.dbo.Acp_Invoice_Hdr.cBatchNo,MAS.dbo.Acp_Invoice_Hdr.nInvValue, MAS.dbo.Acp_Invoice_Hdr.nTax1_Id, MAS.dbo.Acp_Invoice_Hdr.nTax2_Id, MAS.dbo.Acp_Invoice_Hdr.nTax3_Id,"
stra=stra+"MAS.dbo.Acp_Invoice_Hdr.nTax4_Id,MAS.dbo.Acp_Invoice_Hdr.nTax1Value,MAS.dbo.Acp_Invoice_Hdr.nTax2Value,MAS.dbo.Acp_Invoice_Hdr.nTax3Value,"
stra=stra+"MAS.dbo.Acp_Invoice_Hdr.nTax4Value, MAS.dbo.Acp_InvoiceOtherCharg.nOtherChargeValue "
stra=stra+" from MAS.dbo.Acp_Invoice_Hdr inner join MAS.dbo.Acp_InvoiceOtherCharg on MAS.dbo.Acp_InvoiceOtherCharg.nBatchInvId=MAS.dbo.Acp_Invoice_Hdr.nBatchInvId "
stra=stra+" where MAS.dbo.Acp_Invoice_Hdr.cBatchNo=?ACPGRN.cBatchNo "
SQLEXEC(hndOps,stra,'_BatchValue')
ENDSCAN
When I run my form I can't get all the records and it comes only the first records. If the first cBatchNo in myACPGRN is 1234 the output of the _BatchValue in 1234.
How can I get all the records to my cursor?
Thank You