Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan Hangs on Same Record
Message
 
 
À
08/07/2008 10:58:24
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01329709
Message ID:
01329710
Vues:
15
This message has been marked as the solution to the initial question of the thread.
Steven,

For your LABEL FORM try to add NEXT 1 keyword. You need to print only current record, I guess.

http://msdn.microsoft.com/en-us/library/wctdsbch.aspx

[Scope]
Specifies a range of records. Includes only the records that fall within the range. The scope clauses are: ALL, NEXT , RECORD , and REST. The default scope for LABEL is ALL records.



>When I run the following code the Label output never moves past the second record but repeats second record over and over. The SPT returns 5 records. Now if I replace the LABEL line with a MESSAGEBOX if works correctly.
>
>CASE p1 = 6		
>	getPrintedTSOStringA = "Select Distinct whslc From amflib6.itembl Where (LENGTH(TRIM(itnbr)) < 15 Or RIGHT(itnbr,1) <> 'F') And whslc <> 'REJECT' And vndnr = '" + ALLTRIM(p2) + "' And mohtq <> 0 order By whslc"	
>	
>	IF SQLEXEC(tsoVARS.as400con, getPrintedTSOStringA, "getPrintedTSOQueryA") <> -1 Then
>		IF RECCOUNT("getPrintedTSOQueryA") > 0 Then
>			SCAN
>				tsoVars.whloc = getPrintedTSOQueryA.whslc
>				LABEL FORM purchasepartlabels3.lbx PREVIEW &&NOCONSOLE TO Printer
>						
>			ENDSCAN
>			
>			
>		ELSE
>			RETURN .F.
>		EndIf			
>		
>	Else
>		If Aerror(odbcerrormsg) > 0 Then
>			MessageBox(odbcerrormsg(2))
>		EndIf
>		Return .F.
>	ENDIF
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform