query in Oledb to search for numbers

  • Thread starter Thread starter VMI
  • Start date Start date
V

VMI

In Access, I can create a query like "select * from myTable where Name like
'*Joe #*' " and it'll return records like ("Bob Joe 1", "Rick Joe 122",
etc...). What's the equivalent to that in a query that's being run using
OleDB?

Thanks.
 
VMI,

If you are using OleDb to access the Access database, then the query
would be the same. OleDb allows for different providers, each of which has
its own query language. If you change the provider and the underlying data
format, then the query could change as well.

Hope this helps.
 
But the '*' in OleDB is not represented the same way as in Access. If I want
to use wildwards with OleDB, then I need to use '%' (the '*' doesn't work).
Maybe the same thing's happening with the '#' character. Also, i still
didn't understand the part of the provider that you mentioned.


Nicholas Paldino said:
VMI,

If you are using OleDb to access the Access database, then the query
would be the same. OleDb allows for different providers, each of which
has its own query language. If you change the provider and the underlying
data format, then the query could change as well.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

VMI said:
In Access, I can create a query like "select * from myTable where Name
like '*Joe #*' " and it'll return records like ("Bob Joe 1", "Rick Joe
122", etc...). What's the equivalent to that in a query that's being run
using OleDB?

Thanks.
 
Back
Top