Home » Developer & Programmer » JDeveloper, Java & XML » Invalid Column Type Error Msg
Invalid Column Type Error Msg [message #91872] Mon, 09 June 2003 05:20 Go to next message
shobana
Messages: 3
Registered: October 2002
Junior Member
Sql Query runs perfectly in Toad but when I execute the same thro java(using ATG Repository ) it gives me invalid column type

I have pasted my code here

RepositoryView repositoryView = getRepository().getView("category");

Builder builder = (Builder)repositoryView.getQueryBuilder();
String strQuery = "SELECT distinct(dcs_category.display_name),min(dcs_category.category_id) FROM dcs_category ,dcs_cat_ancestors,dcs_sku WHERE LOWER(dcs_category.display_name) like LOWER('B%') and (select count(*) from dcs_cat_ancestors where dcs_cat_ancestors.category_id = dcs_category.category_id) <6 AND dcs_cat_ancestors.category_id = dcs_category.category_id AND dcs_cat_ancestors.anc_cat_id = 2 AND dcs_category.bq_category_type IN ('CATEGORY1','CATEGORY2','CATEGORY3','DEPARTMENT') AND dcs_sku.BQ_AVAILABLE = 'T' AND dcs_sku.BQ_COMPLETE = 'T' AND dcs_category.start_date <= sysdate AND dcs_category.end_date > sysdate group by dcs_category.display_name";
RepositoryItem[[]] AZCatBase = repositoryView.executeQuery(builder.createSqlPassthroughQuery(strQuery, params));
Re: Invalid Column Type Error Msg [message #92589 is a reply to message #91872] Tue, 28 September 2004 10:01 Go to previous message
Tiffany Evers
Messages: 1
Registered: September 2004
Junior Member
I found this error to occur when I'm retrieving the results from the result set and I try to get a result as the wrong type.

For example, if you are retrieving current_date from the database and current_date is defined in the database as type Date, you should use
myResultSet.getDate(x);
instead of anything else like:
myResultSet.getString(x);

Same goes for integers and strings.

I hope this helps you out a little.

Previous Topic: Reading a XML file in ORACLE 8i
Next Topic: Help on OAS-XML
Goto Forum:
  


Current Time: Mon Nov 25 20:44:32 CST 2024