|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
The use of LIKE clause in VB6
Hi,
i am developing a project in vb6 as front-end and ms access as back-end . but i have a problem in the use of like clause .i want to make a dynamic search .when i use the following code : "select * from customer where customerName like 'A%' " it accept. but i want to make it dynamic so that i can enter any string so that i can get the result . I have tried "select * from customer where customerName like '?%' " it fails. Any help would be apprecieted!!!! |
|
#2
|
||||
|
||||
|
Code:
Dim strSearch As String Dim strSql As String strSearch = Trim(txtName.Text) strSql = "SELECT * FROM customer WHERE customerName LIKE '" & strSearch & "*'" Note: % is the SQL Server wildcard character. * is the MS Access wildcard character. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > The use of LIKE clause in VB6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|