Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View and SQLEXEC Return Different Results
Message
De
15/09/2006 07:55:15
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
À
15/09/2006 06:59:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01154007
Message ID:
01154021
Vues:
13
>>I have a view in a VFE application using dynamic view parameters. Executing the view with 'GAMINC' as the parameter returns 300 records. But executing the query from the view, using SQLEXEC, with the same parameter returns 3,956 records, which is what I would expect. This is the code from the SQLEXEC approach. The actual query code was just copied from the view code with the where clause added.
>>
>>h1 = 4
>>TEXT TO csql NOSHOW PRETEXT 7
>>SELECT inv.inp_Vendor,
>>      inv.inp_Long_Item_Name,
>>      inv.inp_Long_Item_Number,
>>      prc.own_Owner_Code,
>>      prc.inp_Short_Item_Number,
>>      prc.prl_Price_List_Code,
>>      prc.pri_term,
>>      prc.pri_Current_Price,
>>      itm.vit_Sku,
>>      brk.vpb_Vendor_Unit_Price,
>>      ity.ity_Inventory_Type_Name
>>   FROM dbo.tblInventoryPrice prc
>>      JOIN dbo.tblInventoryPrimary inv
>>         ON prc.inp_Short_Item_Number = inv.inp_Short_Item_Number
>>      JOIN dbo.tblVendorItem itm
>>         ON inv.inp_Short_Item_Number + inv.inp_Vendor = itm.inp_Short_Item_Number + itm.ven_Vendor_Name
>>      JOIN dbo.tblVendorItemPriceBreak brk
>>         ON itm.vit_Sku + itm.ven_Vendor_Name = brk.vit_Sku + brk.ven_Vendor_Name
>>      JOIN dbo.tblInventoryType ity
>>         ON inv.ity_Inventory_Type_Code = ity.ity_Inventory_Type_Code
>>   WHERE inv.inp_vendor = 'GAMINC'
>>ENDTEXT
>>?SQLEXEC(h1,csql,'results')
>>
>>Can anyone suggest where I should start looking to resolve this?
>>
>>TIA,
>
>I have no experience with VFE, but many frameworks have a setting for max number of records a query can return.

Tore,

I'm not aware of such a setting in VFE and using other vendors as the parameter, the view will return several thousand records. In fact, using other vendors seems to return the correct results so apparently it's something to do with this particular vendor, which is a clue of sorts. But, I have no idea how to interpret it!

Any other thoughts?

TIA,
Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform