THESE FORUMS ARE NOW FROZEN
Please choose "Forums" from the Main menu of www.entityspaces.net to get to our new forums.

using Like in query with Oracle db

rated by 0 users
This post has 8 Replies | 1 Follower

Top 50 Contributor
Posts 48
msyoung Posted: 06-28-2007 1:25 PM

 I am trying to use a query with this "like" statement with Oracle 8.1.7

campaigns.Query.Where(campaigns.Query.Name.Like(criteria.Name));

criteria.Name is a valid string value; 

When execute campaigns.Query.Load(),

I get  Oracle exception: ORA-12704: character set mismatch.

Any suggestions 


Top 10 Contributor
Posts 1,675
Can you post campaigns.Query.es.LastQuery? We do not test against Oracle 8, but you should be able to tell whether the SQL generated is valid for your version.

David Neal Parsons
www.entityspaces.net

Top 50 Contributor
Posts 48

"SELECT * FROM \"PROMDBA\".\"DT_CAMP\" WHERE (\"NAME\" LIKE :NAME1 )"

Looks fine to me. 

Top 50 Contributor
Posts 48

        Value    "%THE COSBY SHOW%"    object {string}

and here is the parameter value as seen in the watch window. 

Top 10 Contributor
Posts 1,675

A quick Google search on that error indicates there may be some issues related to Oracle 8i that do not apply to 10g.

http://forums.asp.net/p/957619/1186441.aspx

Is this an NVARCHAR2 column? Can you change it to VARCHAR2?

David Neal Parsons
www.entityspaces.net

Top 50 Contributor
Posts 48
It is a varchar2.  Is there a way to specify the parameter datatype? Or do you have an alternate suggestion besides just writing the sql?
Top 10 Contributor
Posts 1,675
Using DynamicQuery, there is no way to interact with the parameters that EntitySpaces creates. So, changing the parameter type from String to Empty is not possible. Does this only affect Where parameters? Does LoadAll() work?

David Neal Parsons
www.entityspaces.net

Top 50 Contributor
Posts 48
LoadAll works fine.
Top 150 Contributor
Posts 19

Hi 

I have the same problem here, so it does not seem to have changed in newer versions. Did you ever get this problem solved?

Could be grat with some internal help here from the ES guys!

It does not matter wetter you use wildcards or not, ie. '%peted%' and 'peter' both fails with ORA-12704 error.

 Best regards

Peter Meldgaard

Page 1 of 1 (9 items) | RSS
Copyright © 2005 - 2009, EntitySpaces, LLC