Subject | Re: Mac OSX and Varchar |
---|---|
Author | ew8ew8 |
Post date | 2005-02-16T14:13:34Z |
> Can you post complete stack trace?(pure java,
>
> > Same query works on Windows FB (both 1.5).
>
> Can you try to reproduce it with the different types of drivers
> native)? Does it work, if you try to execute same statements inisql?
Thanks for your response, the query fails in isql also:
The following will fail (which is not the exact query), I will post
that next:
(the following fails)
select * from cloze_lesson;
The actual query is the following:
(this fails also)
SELECT cloze_lesson.lesson_id AS "lessonId",
cloze_lesson.target_word AS "targetWord", cloze_lesson.lesson_type
AS "lessonType", cloze_lesson.segment_text_1 AS "text1",
cloze_lesson.segment_text_2 AS "text2",
cloze_lesson.segment_text_3 AS "text3", cloze_lesson.segment_text_4
AS "text4", cloze_lesson.segment_text_5 AS "text5",
cloze_lesson.segment_text_6 AS "text6", cloze_lesson.segment_text_7
AS "text7", cloze_lesson.segment_text_8 AS "text8",
cloze_lesson.blank_line_nr AS "blankLinePos",
cloze_lesson.answer_choice_1 AS "answerChoice1",
cloze_lesson.answer_choice_2 AS "answerChoice2",
cloze_lesson.answer_choice_3 AS "answerChoice3",
cloze_lesson.answer_choice_4 AS "answerChoice4",
cloze_lesson.correct_answer AS "correctAnswer", cloze_lesson.phrase
AS "phrase", cloze_lesson.skill_type AS "skillType",
cloze_lesson.centering AS "centering",
cloze_topic_lessons.lesson_order AS "lessonOrder" FROM cloze_lesson
INNER JOIN cloze_topic_lessons ON cloze_lesson.lesson_id =
cloze_topic_lessons.lesson_id WHERE
(cloze_topic_lessons.topic_id = 61) ORDER BY
cloze_topic_lessons.lesson_order DESC
The error is isql is:
=====================================================================
========== ============
================================================== ============
Statement failed, SQLCODE = -901
message length error (encountered -24432, expected 41104)
What I was going to try is the following:
(which works in isql not on java side)
SELECT cloze_lesson.lesson_id AS "lessonId",
cloze_lesson.target_word AS "targetWord", CAST
(cloze_lesson.lesson_type AS VARCHAR(1000)) AS "lessonType", CAST
(cloze_lesson.segment_text_1 AS VARCHAR(1000)) AS "text1", CAST
(cloze_lesson.segment_text_2 AS VARCHAR(1000)) AS "text2", CAST
(cloze_lesson.segment_text_3 AS VARCHAR(1000)) AS "text3", CAST
(cloze_lesson.segment_text_4 AS VARCHAR(1000)) AS "text4", CAST
(cloze_lesson.segment_text_5 AS VARCHAR(1000)) AS "text5", CAST
(cloze_lesson.segment_text_6 AS VARCHAR(1000)) AS "text6", CAST
(cloze_lesson.segment_text_7 AS VARCHAR(1000)) AS "text7", CAST
(cloze_lesson.segment_text_8 AS VARCHAR(1000)) AS "text8",
cloze_lesson.blank_line_nr AS "blankLinePos",
cloze_lesson.answer_choice_1 AS "answerChoice1",
cloze_lesson.answer_choice_2 AS "answerChoice2",
cloze_lesson.answer_choice_3 AS "answerChoice3",
cloze_lesson.answer_choice_4 AS "answerChoice4",
cloze_lesson.correct_answer AS "correctAnswer", cloze_lesson.phrase
AS "phrase", cloze_lesson.skill_type AS "skillType",
cloze_lesson.centering AS "centering",
cloze_topic_lessons.lesson_order AS "lessonOrder" FROM cloze_lesson
INNER JOIN cloze_topic_lessons ON cloze_lesson.lesson_id =
cloze_topic_lessons.lesson_id WHERE
(cloze_topic_lessons.topic_id = 61) ORDER BY
cloze_topic_lessons.lesson_order DESC
java.lang.IllegalArgumentException
at sun.reflect.UnsafeIntegerFieldAccessorImpl.set
(UnsafeIntegerFieldAccessorImpl.java:80)
at java.lang.reflect.Field.set(Field.java:519)
at com.taylor.bol.dataaccess.UniversalMapper.getFireBirdData
(UniversalMapper.java:304)
at com.taylor.bol.dataaccess.UniversalMapper.getData
(UniversalMapper.java:92)
at com.taylor.apps.cloze.bol.dataaccess.ClozeTitleMapper.get
(ClozeTitleMapper.java:123)
at
Using metadata to build object on java side:
tempField.set(obj, set.getObject((String) m_columnNames.get(j)));
Any help would be appreciated....
Thanks
Eric