J
JohnAdams
New to the VS.NET 2005 and I am writing a program using an access database as
the datasource in visual studio.NET 2005 The problem I have is I am trying
to write a parameterized query where a wildcard can be used to pull a
complete name from only one or two characters entered. If I have the exact
name I can get it to work with a ? but this defeats the purpose of the query
and the sql select for the access database doesn't reconize the * that is
used in access as a wildcard.
The satements I have right now are:
SELECT CustomerNumber, Name, Address, City, State, Zip, Phone, LastOrdDate,
Inactive
FROM Customers
WHERE Name = ?
SELECT CustomerNumber, Name, Address, City, State, Zip, Phone, LastOrdDate,
Inactive
FROM Customers
WHERE CustomerNumber = ?
and when I try to do this (or any version of it):
SELECT CustomerNumber, Name, Address, City, State, Zip, Phone, LastOrdDate,
Inactive
FROM Customers
WHERE CustomerNumber = '*'
or
WHERE CustomerNumber = ? &'*'
I get an error of this:
Error in WHERE clause near '*'.
Unable to parse query text.
I have even tried the % for sql databases and still no help.
the datasource in visual studio.NET 2005 The problem I have is I am trying
to write a parameterized query where a wildcard can be used to pull a
complete name from only one or two characters entered. If I have the exact
name I can get it to work with a ? but this defeats the purpose of the query
and the sql select for the access database doesn't reconize the * that is
used in access as a wildcard.
The satements I have right now are:
SELECT CustomerNumber, Name, Address, City, State, Zip, Phone, LastOrdDate,
Inactive
FROM Customers
WHERE Name = ?
SELECT CustomerNumber, Name, Address, City, State, Zip, Phone, LastOrdDate,
Inactive
FROM Customers
WHERE CustomerNumber = ?
and when I try to do this (or any version of it):
SELECT CustomerNumber, Name, Address, City, State, Zip, Phone, LastOrdDate,
Inactive
FROM Customers
WHERE CustomerNumber = '*'
or
WHERE CustomerNumber = ? &'*'
I get an error of this:
Error in WHERE clause near '*'.
Unable to parse query text.
I have even tried the % for sql databases and still no help.