Hello,
When using the OracleDataTable object I'm running into issues using the DataTable.Select() feature. Is there anyway to implement Select filtering in this fashion? Several third party DataGrids use this method to provide a filtering and sorting method.
When I implement something similar to the following I get the below error.
Code Implemented:
Dim objTab As New OracleDataTable
Dim objCommand = New OracleCommand
objCommand .CommandText = "SELECT PRIVILEGE FROM SESSION_PRIVS"
With objTab
.Connection =MyConnection
.SelectCommand = objCommand
.ReadLobMode = ReadLobMode.DefferedCachedDirect
.FetchAll = True
.ReturnProviderSpecificTypes = True
.CachedUpdates = False
.Active = True
End With
msgbox(
objTab.Select("PRIVILEGE IN ('CREATE PUBLIC SYNONYM','CREATE ANY SYNONYM')").Length
)
Exception Generated:
cannot perform '=' operation on CoreLab.Oracle.OracleString and System.String
cannot perform '=' operation on CoreLab.Oracle.OracleString and System.String
-
- Posts: 25
- Joined: Mon 02 Oct 2006 19:15
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 25
- Joined: Mon 02 Oct 2006 19:15
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
-
- Posts: 729
- Joined: Thu 13 Dec 2007 10:24
We have done a small research concerning the problem.
Unfortunately, the requested functionality could not be implemented.
The code is being parsed by the standard ADO .NET classes that are aware only about “known” types.
OracleString is not a “known” type and CLR throws the exception. ODP has the same problem.
To sum up, the solution stays the same:
Unfortunately, the requested functionality could not be implemented.
The code
Code: Select all
objTab.Select("PRIVILEGE IN ('CREATE PUBLIC SYNONYM','CREATE ANY SYNONYM')").Length
OracleString is not a “known” type and CLR throws the exception. ODP has the same problem.
To sum up, the solution stays the same:
Code: Select all
.ReturnProviderSpecificTypes=False