Mark,
From what I am seeing here, I not only have to paste the code, but change the clause order as well. Is the INNER JOIN ... ON structure the way to fix the code or is it trial and error to determine what works?
TIA
Rex
>Yes, it is a problem with the VFP View Designer. The problem is caused by the nested JOINs. You will have to paste your code into a PRG, run the PRG and do all the DBSETPROP and CURSORSETPROP commands yourself to make the view updatable. OR You can download Erik Moore's EVIEW utility which will help you set this up programmatically.
>
>You can also run GENDBC.APP in the HOME() + "tools\gendbc" folder to generate all the code needed to create your database, table, views, relations, keys, indexes, connections, etc.
>
>Once you create these types of views, you can not edit them in the View Designer.
>
>
>>Ok, I'll try it, but the problem is that this is the code generated by VFP itself. Is this a common problem?
>>
>>TIA
>>
>>Rex
>>
>>>Hi Rex.
>>>
>>>>CREATE SQL VIEW "LV_VACCINEBRAND" ;
>>>> AS SELECT Sbrand.*, Smanvac.imanufacturerid, Smanvac.ivaccineid, Smanufac.cname AS cmanufacturer FROM impact!smanvac INNER JOIN impact!sbrand INNER JOIN impact!smanufac ON Smanufac.iid = Smanvac.imanufacturerid ON Smanvac.iid = Sbrand.imanufacturervaccineid WHERE Sbrand.imanufacturervaccineid = ?vp_iManufacturerVaccineId
>>>
>>>Rearrange the joins to be like this:
>>>
>>> FROM impact!smanvac ;
>>> INNER JOIN impact!sbrand ;
>>> ON Smanvac.iid = Sbrand.imanufacturervaccineid ;
>>> INNER JOIN impact!smanufac ;
>>> ON Smanufac.iid = Smanvac.imanufacturerid ;
>>>
>>>This works fine.
>>>
>>>Doug
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only