|
|
|
Chris Erickson-2
|
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
|
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 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
|
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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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
|
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.
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica What is the error? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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 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.
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica What is the error? From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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.
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica What is the error? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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.
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica What is the error? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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 It tells me that the provider
doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does. Ideas?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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.
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica What is the error? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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 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 It tells me that the
provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it
does. Ideas?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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.
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica What is the error? From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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
|
Some javascript/style in this post has been disabled (why?)
Thanks for your help. In the managed api, where is
FDO_FUNCTION_LOWER?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Thomas Knoell 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 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 It tells me that the provider
doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does. Ideas?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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.
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica What is the error? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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 Thanks for your help. In the managed api,
where is FDO_FUNCTION_LOWER?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Thomas Knoell 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 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 It tells me that the
provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it
does. Ideas?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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.
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica What is the error? From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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
|
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? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Thomas Knoell 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 Thanks for your help. In the managed api, where is
FDO_FUNCTION_LOWER?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Thomas Knoell 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 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 It tells me that the provider
doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it does. Ideas?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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.
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica What is the error? From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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?
From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From:
[hidden email] [mailto:[hidden email]] On
Behalf Of Chris Erickson 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
|
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. 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 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? From: [hidden email]
[mailto:[hidden email]] On Behalf Of Thomas Knoell 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 Thanks for your help. In the managed api,
where is FDO_FUNCTION_LOWER?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Thomas Knoell 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 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 It tells me that the
provider doesn’t support LOWER (SQL 2008 / SDE 9.2) when I know it
does. Ideas?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica To find if a provider supports LOWER is easy: just check ExpressionCapabilities. From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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.
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica What is the error? From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chris Erickson 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?
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Stoica Do you mean the native name? Why do you need it? Thanks, Dan. From: [hidden email] [mailto:[hidden email]]
On Behalf Of Chris Erickson 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 |
||||||||||||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |