ado .net datatable .select method syntax, recognized functions, etc

B

Bernie Yaeger

You can use trim() inside a datatable .select but it is not recognized in
t-sql; on the other hand, ltrim() is recognized in t-sql but not in a
datatable .select; therefore, inside vb .net, this works:

For Each irow In dsspship_.Tables(0).Select("(qrange_e - qrange_s) >
0 and len(trim(pubcode)) > 0")

whereas this doesn't:

For Each irow In dsspship_.Tables(0).Select("(qrange_e - qrange_s) >
0 and len(ltrim(pubcode)) > 0")

(but this latter works in t-sql but the former does not).

Now the real question is this - is there any place I can go to get a full
list of
syntactic differences, functions that the .select method recognizes, etc?

Thanks for any help.

Bernie Yaeger
 
M

Miha Markic [MVP C#]

Hi Bernie,

You might take a look at help topic for DataColumn.Expression.
I think that it pretty much sumarizes the functions supported by ado.net.
 
B

Bernie Yaeger

Hi Miha,

Thanks - I'll take a look at it.

Bernie

Miha Markic said:
Hi Bernie,

You might take a look at help topic for DataColumn.Expression.
I think that it pretty much sumarizes the functions supported by ado.net.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Bernie Yaeger said:
You can use trim() inside a datatable .select but it is not recognized in
t-sql; on the other hand, ltrim() is recognized in t-sql but not in a
datatable .select; therefore, inside vb .net, this works:

For Each irow In dsspship_.Tables(0).Select("(qrange_e - qrange_s)

0 and len(trim(pubcode)) > 0")

whereas this doesn't:

For Each irow In dsspship_.Tables(0).Select("(qrange_e - qrange_s)

0 and len(ltrim(pubcode)) > 0")

(but this latter works in t-sql but the former does not).

Now the real question is this - is there any place I can go to get a full
list of
syntactic differences, functions that the .select method recognizes, etc?

Thanks for any help.

Bernie Yaeger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top