Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View and SQLEXEC Return Different Results
Message
From
15/09/2006 07:55:15
 
 
To
15/09/2006 06:59:30
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01154007
Message ID:
01154021
Views:
12
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform