Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get records from foxpro cursor.

Status
Not open for further replies.

Niki_S

Programmer
Jun 4, 2021
232
LK
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.

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
 
Okay.... then why can't we get records based on cBatchNo not using nPoDtlID ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top