>I am trying to make VFP work with MS-SQL 2000 is an easy way.
>I was creating new sql views for each set I needed returned and I have finally figured out how to use the ? to get my data variable.
>QUESTION - How do I pass a ordering variable to the view
>
>The error I get is
>Connectivity error Line1:
>Incorrect syntax near '@P2'
>
>mORDER = 'ORDER BY BRAND, CATEGORY, DESCRIPT '
>
>Create Sql View i_NEED Remote Connection EISI As ;
>SELECT Items.DEF_VENDPO, Items.ITEMNO, Items.CATEGORY, Items.BRAND,;
> Items.MODEL, Items.DESCRIPT, Items.CUSTCHAR5 AS size,;
> Items.CUSTCHAR6 AS color, Items.COST, Items.SELLPRIC, Items.QTY_STK,;
> Items.MIN_NEEDED, Items.AVG_BET_SI, Items.LIFE_Q_PR, Items.LIFE_Q_SI,;
> Items.Q_ON_ORDER, Items.Q_ON_RESER, Items.LPR_DATE, Items.LSI_DATE,;
> Items.MAX_BET_PR, Items.CUSTCHAR3 AS note, Items.CUSTCHAR4 AS yeardt,;
> Items.CUSTNUM1 AS slow, Items.CREAT_DATE, Items.ACTIVE, Items.WEB_ACTIVE;
> FROM items Items;
> WHERE category = ?mLOCATE;
> AND active = 'T' ?mORDER
Check the last line. Would it be
items.active = 'T'+?mORDER or what? The syntax there doesn't seem to be right.