Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ado.net queries against an Access database

Status
Not open for further replies.

edpatterson

IS-IT--Management
Joined
Feb 24, 2005
Messages
186
Hopefully this is the correct area.

This works within Access

[tt]
SELECT DISTINCT (Left([ipaddress],InStrRev([ipaddress],'.')-1)) AS temp FROM Hosts WHERE (((Hosts.IPAddress) Is Not Null))
[/tt]

Fails with 'Undefined function 'InStrRev' in expression.

I have googled everything but the correct terms for a list on known functions if any in ado.net.

Do I have to query out all of the records and process them with .net?

Ed
 
StrReverse and InStrRev aren't supported by ADO.net. I would just process the records with .net.

Here's another option, but I wouldn't recommend it:
Since you aren't depending on the string parsing in your where clause to reduce the recordset size, I think it would be preferable to do string manipulation in .net rather than hack up your database.

Hope this helps,

Alex




[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top