Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Search Criteria
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00816469
Message ID:
00816471
Views:
22
Swap you condition around,
lcdesign = ["] + ALLTRIM(thisform.pageframe1.page1.text1.value) + [" $ modacad.key3 ]
* or SQL style
lcdesign = [modacad.key3 LIKE "%] + ALLTRIM(thisform.pageframe1.page1.text1.value) + [%"]
>I am trying to search a table where the design number is equal to the value that I enter. The following code demonstrates this:
>
>
>SET EXCLUSIVE OFF
>SET DELETED ON
>USE ("U:\Data\Modacad.dbf")
>
>lcdesign = 'modacad.key3'+'$'+'thisform.pageframe1.page1.text1.value'
>
>WITH thisform.pageframe1.page1.list1
> .RowSourcetype = 3
> .Rowsource = 'SELECT mainkey FROM modacad where &lcdesign'+;
>              ' into cursor result'
>ENDWITH
>
>
>The problem I have is when I enter a design number for example JKT400 the results in my list box shows just:
>
>JKT400
>
>What I would expect to see is:
>
>JKT400
>JKT400B
>JKT400C
>JKT400NH
>
>I thought the = condition meant beginning with and the == was exact match. Can anybody help me in determining how to change my search criteria so that I can get the results shown above.
>
>Many Thanks in Advance
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform