Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Works in Command Window but not when running form
Message
 
 
À
02/12/2014 15:00:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611698
Message ID:
01611705
Vues:
64
>I have the following query
>Select csrBOM_1.*, pUniq_Key As Assy_uniq, pAssyNo As assy_no, pAssyRev As Assy_Rev, pAssyDesc As Assy_Desc, ;
>				pCustAssy As Cust_Assy, lnLevel As nLevel, pUniq_Key As Bom_Parent ;
>				FROM csrBOM_1 Where (PART_SOURC IN('PHANTOM', 'MAKE')) Or ;
>				(PART_SOURC = 'MAKE' And PHANT_MAKE) Into Cursor csrBOM_Two Readwrite
>
>When it runs in a compiled app it gives an error "Function Arguement value, type, or count is invalid"
>
>If I run the application in VFP and put it in Debug mode it will error when that line is encountered
>
>If I cut and paste the line into the command window it executes properly.
>
>I changed the query to
>Select csrBOM_1.*, pUniq_Key As Assy_uniq, pAssyNo As assy_no, pAssyRev As Assy_Rev, pAssyDesc As Assy_Desc, ;
>				pCustAssy As Cust_Assy, lnLevel As nLevel, pUniq_Key As Bom_Parent ;
>				FROM csrBOM_1 Where PART_SOURC IN ('PHANTOM', 'MAKE') Or ;
>				(PART_SOURC = 'MAKE' And PHANT_MAKE) Into Cursor csrBOM_Two Readwrite
>
>( Removed a set of parens and added a space after the IN parameter)
>
>and now the query runs in the app and command window.
>
>Is there something about the extra parens and/or the missing space that could cause this?????
>
>Thanks........Rich

Is lnLevel a variable?

Also, your where doesn't make much sense as it's written. I think it should be
Where PART_SOURC='PHANTOM' Or ;
				(PART_SOURC = 'MAKE' And PHANT_MAKE)
assuming that the second column is logical. Are you sure phant_make is logical column?
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform