|
-
Jun 21st, 2004, 09:43 AM
#1
Thread Starter
Junior Member
Select SQL statement with * as wildcard character
I am trying to populate a combo box with a subset of names from an Access data base using the * character.
The Debug.Writeline text of the SQL statement I am using in the SELECT statement is:
SELECT TBLNames.Name FROM TBLNames WHERE (((TBLNames.Name) Like "Rob*"))
This SQL statement works within the Access db itself to return all names starting with Rob.
But in .NET it only returns the name, Rob*, if I force that into the db.
Can anyone help?
-
Jun 21st, 2004, 09:47 AM
#2
Try using % instead of * (and _ instead of ?)
-
Jun 21st, 2004, 09:50 AM
#3
Frenzied Member
You want Rob to be in single quotes, not double.
-
Jun 21st, 2004, 10:01 AM
#4
Thread Starter
Junior Member
Thanks a lot, Si - the % worked straight up.
You've saved me some hours of hassle tonight!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|