By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 2,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

ASP and Access, problem with LIKE statement

P: n/a
Hi,

I have an ASP page which uses a LIKE statement to get products back.
The syntax as far as I can tell is near perfect but it just doesn't
return any records, grrrr.

By running it directly in Access (Using * in place of %) it works like
a charm.

I am using Access 2003, my connection string is:
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strDabaseName & ";"

The SQL String comes out as:
Select * from tbl_products Where name like '%Roadster%' And active = 1
order by name

Any ideas?

Cheers

Jul 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 25 Jul 2006 13:23:21 -0700, si*****@creativejam.co.uk wrote:

Not sure this is the problem, but "Name" is a reserved word and thus
better not used for a field name. Change it to ProductName.

For help with connection strings I go to connectionstrings.com.

I like to use Server.MapPath on the location of the database.

-Tom.

>Hi,

I have an ASP page which uses a LIKE statement to get products back.
The syntax as far as I can tell is near perfect but it just doesn't
return any records, grrrr.

By running it directly in Access (Using * in place of %) it works like
a charm.

I am using Access 2003, my connection string is:
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strDabaseName & ";"

The SQL String comes out as:
Select * from tbl_products Where name like '%Roadster%' And active = 1
order by name

Any ideas?

Cheers
Jul 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.