Get LOWER function name for source

14 messages Options
Embed this post
Permalink
Chris Erickson-2

Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 


_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Dan Stoica

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 


_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Dan Stoica

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Dan Stoica

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Dan Stoica

RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Note you can use FDO_FUNCTION_LOWER instead of “LOWER”.

 

Yes, in these cases if the  provider says a function is not supported it means it is not supported natively.

 

The missing functions can be added as custom functions, I guess.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:45 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Thomas Knoell-2

RE: RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Chris,

 

If a provider indicates that it does not support an expression function, then this is independent of whether or not there is native support for it.

 

The ArcSDE provider gets the list of supported functions from the Expression Engine and hence will include the function LOWER as a supported function. If a function is in the list that is not natively supported the provider will redirect the request to the Expression Engine to handle it. To see all supported expression function names, you can use the GetFunctions interface on the expression capabilities and query it. The fact that your check “Contains” does not return the correct answer may have to do with the spelling of the function name. As Dan suggested try using the constant FDO_FUNCTION_LOWER.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: July-31-09 2:56 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Note you can use FDO_FUNCTION_LOWER instead of “LOWER”.

 

Yes, in these cases if the  provider says a function is not supported it means it is not supported natively.

 

The missing functions can be added as custom functions, I guess.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:45 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Thanks for your help.

 

In the managed api, where is FDO_FUNCTION_LOWER?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Knoell
Sent: Friday, July 31, 2009 1:10 PM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Hi Chris,

 

If a provider indicates that it does not support an expression function, then this is independent of whether or not there is native support for it.

 

The ArcSDE provider gets the list of supported functions from the Expression Engine and hence will include the function LOWER as a supported function. If a function is in the list that is not natively supported the provider will redirect the request to the Expression Engine to handle it. To see all supported expression function names, you can use the GetFunctions interface on the expression capabilities and query it. The fact that your check “Contains” does not return the correct answer may have to do with the spelling of the function name. As Dan suggested try using the constant FDO_FUNCTION_LOWER.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: July-31-09 2:56 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Note you can use FDO_FUNCTION_LOWER instead of “LOWER”.

 

Yes, in these cases if the  provider says a function is not supported it means it is not supported natively.

 

The missing functions can be added as custom functions, I guess.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:45 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Thomas Knoell-2

RE: RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Chris,

 

Sorry for the late response. Not sure if this is still an issue for you, but just in case, FDO_FUNCTION_LOWER is defined in the file IExpressionCapabilities.h in the unmanaged part (Fdo\Unmanaged\Inc\\Fdo\Connections\Capabilities) only, hence it appears that it is not available in the managed code. It is defined as follows:

 

#define  FDO_FUNCTION_LOWER      L"Lower"

 

Maybe using the string the constant is set to solves your issues.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: August-06-09 11:03 AM
To: FDO Users Mail List
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Thanks for your help.

 

In the managed api, where is FDO_FUNCTION_LOWER?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Knoell
Sent: Friday, July 31, 2009 1:10 PM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Hi Chris,

 

If a provider indicates that it does not support an expression function, then this is independent of whether or not there is native support for it.

 

The ArcSDE provider gets the list of supported functions from the Expression Engine and hence will include the function LOWER as a supported function. If a function is in the list that is not natively supported the provider will redirect the request to the Expression Engine to handle it. To see all supported expression function names, you can use the GetFunctions interface on the expression capabilities and query it. The fact that your check “Contains” does not return the correct answer may have to do with the spelling of the function name. As Dan suggested try using the constant FDO_FUNCTION_LOWER.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: July-31-09 2:56 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Note you can use FDO_FUNCTION_LOWER instead of “LOWER”.

 

Yes, in these cases if the  provider says a function is not supported it means it is not supported natively.

 

The missing functions can be added as custom functions, I guess.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:45 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Chris Erickson-2

RE: RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

So, jus to be clear,

I should always be able to use ‘Lower’ because it is either supported in the provider or supported by the expression engine?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Knoell
Sent: Tuesday, August 11, 2009 6:51 AM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Hi Chris,

 

Sorry for the late response. Not sure if this is still an issue for you, but just in case, FDO_FUNCTION_LOWER is defined in the file IExpressionCapabilities.h in the unmanaged part (Fdo\Unmanaged\Inc\\Fdo\Connections\Capabilities) only, hence it appears that it is not available in the managed code. It is defined as follows:

 

#define  FDO_FUNCTION_LOWER      L"Lower"

 

Maybe using the string the constant is set to solves your issues.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: August-06-09 11:03 AM
To: FDO Users Mail List
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Thanks for your help.

 

In the managed api, where is FDO_FUNCTION_LOWER?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Knoell
Sent: Friday, July 31, 2009 1:10 PM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Hi Chris,

 

If a provider indicates that it does not support an expression function, then this is independent of whether or not there is native support for it.

 

The ArcSDE provider gets the list of supported functions from the Expression Engine and hence will include the function LOWER as a supported function. If a function is in the list that is not natively supported the provider will redirect the request to the Expression Engine to handle it. To see all supported expression function names, you can use the GetFunctions interface on the expression capabilities and query it. The fact that your check “Contains” does not return the correct answer may have to do with the spelling of the function name. As Dan suggested try using the constant FDO_FUNCTION_LOWER.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: July-31-09 2:56 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Note you can use FDO_FUNCTION_LOWER instead of “LOWER”.

 

Yes, in these cases if the  provider says a function is not supported it means it is not supported natively.

 

The missing functions can be added as custom functions, I guess.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:45 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Thomas Knoell-2

RE: RE: Get LOWER function name for source

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Chris,

You are generalizing too much.

A provider will always indicate the expression functions it supports - independent of how the function is actually implemented - via the expression capabilities. You can use the interface FdoIExpressionCapabilities::GetFunctions() to get the complete list of supported expression functions. Any function that is returned in the FdoFunctionDefinitionCollection should be supported (if it is not then this should be an error).

In case of the ArcSDE Provider - you referred to this provider previously - the above interface is realized by getting the list of expression functions from the Expression Engine (see file ArcSDEExpressionCapabilities.cpp). The Expression Engine`s list of standard functions includes the function LOWER. Therefore, the provider should support it.

The Expression Engine has a default implementation of all the functions it supports. A provider can therefore utilize this functionality to implement its support of those functions. But that is up to the provider implementation.

By using the function name you get back from the list returned by the interface FdoIExpressionCapabilities::GetFunctions() you should have no problem executing it.

Thanks

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: August-11-09 6:02 PM
To: FDO Users Mail List
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

So, jus to be clear,

I should always be able to use ‘Lower’ because it is either supported in the provider or supported by the expression engine?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Knoell
Sent: Tuesday, August 11, 2009 6:51 AM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Hi Chris,

 

Sorry for the late response. Not sure if this is still an issue for you, but just in case, FDO_FUNCTION_LOWER is defined in the file IExpressionCapabilities.h in the unmanaged part (Fdo\Unmanaged\Inc\\Fdo\Connections\Capabilities) only, hence it appears that it is not available in the managed code. It is defined as follows:

 

#define  FDO_FUNCTION_LOWER      L"Lower"

 

Maybe using the string the constant is set to solves your issues.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: August-06-09 11:03 AM
To: FDO Users Mail List
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Thanks for your help.

 

In the managed api, where is FDO_FUNCTION_LOWER?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Thomas Knoell
Sent: Friday, July 31, 2009 1:10 PM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] RE: Get LOWER function name for source

 

Hi Chris,

 

If a provider indicates that it does not support an expression function, then this is independent of whether or not there is native support for it.

 

The ArcSDE provider gets the list of supported functions from the Expression Engine and hence will include the function LOWER as a supported function. If a function is in the list that is not natively supported the provider will redirect the request to the Expression Engine to handle it. To see all supported expression function names, you can use the GetFunctions interface on the expression capabilities and query it. The fact that your check “Contains” does not return the correct answer may have to do with the spelling of the function name. As Dan suggested try using the constant FDO_FUNCTION_LOWER.

 

Thanks

 

  Thomas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: July-31-09 2:56 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Note you can use FDO_FUNCTION_LOWER instead of “LOWER”.

 

Yes, in these cases if the  provider says a function is not supported it means it is not supported natively.

 

The missing functions can be added as custom functions, I guess.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:45 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It tells me that the provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does.  Ideas?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 12:41 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

So, like:

if (_connection.ExpressionCapabilities.Functions.Contains("LOWER"))

                        //need to search for variants

                        updateFilter = String.Format(" LOWER({0}) = {1} OR LOWER({0}) = {2}"...

                    else

                    {

                        result.Message += " Warning: Could not do case insensitive search.  LOWER not supported by datasource.";

                        updateFilter = String.Format(" {0} = {1} OR {0} = {2}"...

 

Is there any way to get the function name, or is it standard across almost all providers?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:35 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

To find if a provider supports LOWER is easy: just check ExpressionCapabilities.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:25 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

It works on a select, on an update I get an error (invalid function or return type LOWER).

 

I would more would just like to code it correctly to work with more providers, and to be able to identify if a provider supports LOWER.

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 12:13 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

What is the error?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 2:04 PM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Setting a query filter, wanting to match for GUID variations in fields that are of string type (i.e. oracle):

 

(DOTNET)

string queryFilter = “LOWER(MyGuidFieldName) = ‘83a1fb63-8141-4a75-987c-c64552e3b240’ OR LOWER(MyGuidFieldName) = ‘{83a1fb63-8141-4a75-987c-c64552e3b240}’”;

 

IUpdate updateCommand = new …

updateCommand.SetFilter(queryFilter);

updateCommand.Execute(); <- right now this doesn’t work…

 

 

Is there a better way to be doing this?

 

cid:image003.png@01C8E59D.204D9280

chris erickson

developer

[hidden email]

970.493.9500 x 191

970.482.1485 (fax)

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dan Stoica
Sent: Friday, July 31, 2009 11:59 AM
To: FDO Users Mail List
Subject: [fdo-users] RE: Get LOWER function name for source

 

Do you mean the native name?

 

Why do you need it?

 

Thanks,

Dan.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Erickson
Sent: Friday, July 31, 2009 1:52 PM
To: FDO Users Mail List
Subject: [fdo-users] Get LOWER function name for source

 

Hello,

Is there a straightforward way to get the LOWER function name for a connection?

 

Thanks,

Chris Erickson

 



_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users