Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 16th, 2004, 06:36 AM
Friend of Wrox
Join Date: Sep 2003
Location: Whitstable, , United Kingdom.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'like' problem with asp.net/ ado

I have a simple asp.net webpage that uses a bound datagrid
via a .net ado connection.

I have a problem with a query that runs when I use under my Access
2002 query builder pane but does not run when I use it via my
ado connection. the query syntax is as follows:

'select * from employees where firstname like '*ste*'

under the Access query pane I get all employees whose first name
contains 'ste' ( eg stephen, steve, steven, etc)

However when I run this query under ado - I get no records returned.
Should I use different wildcards ( ie '*' characters ) under ado ?

Any suggestions much appreciated.

Reply With Quote
  #2 (permalink)  
Old September 16th, 2004, 06:48 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

Use % instead (http://www.adopenstatic.com/faq/likequeries.asp)
Reply With Quote
  #3 (permalink)  
Old September 16th, 2004, 01:50 PM
Friend of Wrox
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post

I think your syntax problem is the use of single quotes (').
You can't have 3 single quotes in your query, you should use
combination of double and single quotes in pairs. More than
1 pair should be excaped.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADO.Net Problem akhilesh_g ASP.NET 2.0 Professional 2 December 18th, 2007 05:33 AM
Can you use Asp 3.0 with ADO.NET? handles Classic ASP Basics 0 September 30th, 2005 07:37 PM
Ado.net Problem... NitinJoshi General .NET 2 January 10th, 2005 04:49 AM
ADO.NET Problem lakmaldp ADO.NET 1 July 15th, 2004 01:58 AM
ADO.NET Problem dfb78 Classic ASP Databases 1 June 5th, 2003 05:01 PM

All times are GMT -4. The time now is 07:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.