This content has been marked as final. Show 30 replies
I tried the following and it worked:
Attach NO convertor to the TextField which holds just text and is bound to a CHAR column in the database.
For the field which is bound to an INTEGER column in the database, I used a Number Comvertor and that worked.
I wonder why an IntegerConvertor did not work?
When I use this with Oracle 8i database, I keep getting an error:
My oracle column is CHAR, and I've tried all the convertors for the TextField which is bound to it.
Conversion error occurred.
Something seems strange....is it the Oracle driver? Looks like it is working okay with Pointbase.
Hi Haroon - a few questions :
- are you using the default drivers which come w/Creator?
- when you open the table in the server navigator, you can click on the columns which are giving you trouble and see the properties in the property sheet - what values are shown for SQL TYPE and TYPE NAME properties?
- if possible, can you go into sqlplus and do a desc on that table and post the results? that way we can check it out here more easily.
- are null values allowed in the column?
-Yes, I am using the default drivers provided with Creator
- Values shown for the troble column in the database:
SQL TYPE - CHAR
TYPE NAME - CHAR
COLUMN SIZE - 250
- Null Values are allowed
- SQL PLUS Post
-Database is Oracle 8i
Thanks for your help.
Thanks Haroon - I'll look into it.
Out of curiousity, did you try varchar2's? I think that's the one we most commonly see on Oracle - but the char should work too...
Tried VARCHAR2, as well. Same problem. The moment I 'unbind' from database, the problem goes away, but then I can't use that feature anymore.
Just moved from my trial copy to a paid subscription, so am keen to get this feature to work.
You guys are giving great help, thanks!
Let me know if there's anything else I can do to sort this issue out.
Did you download the AppModel example? Look at the page simple.jsp - I think it's doing exactly what you're looking for - as does the Insert Update Delete tutorial. Have you gone through those yet?
Rereading the thread- I want to make sure I'm understanding -
- Were you successful inserting into Pointbase with bound textfields? The tutorial works fine for me there. If that hasn't worked for you, we should start by troubleshooting there.
- Are you using the default converters (which Creator applies the first time a component is bound) or are you using some others? What happens if you bind the textfields to the database, and then remove the converters entirely? Since the columns are char's, I would think that the converter really isn't necessary... unless you have your own custom converter etc...
- I assume you have a message list component (or a message component for each textfield) on your page - this may give you more info.
Sorry this is taking so long!! If you can make a simple 1 page example of what you're doing, it might make sense for you to send in your project... then we can work on that together....
I have created a one page project, which captures the problem I'm having. I've zipped it to a 1.5 MB file, and can send it to you if you want.
But it is pretty basic:
I've added 6 components to a page:
-1 RowSet from Oracle 8i table (let's call it ORA Rowset) It has CHAR type columns
-1 RowSet from Poiintbase table (let's call it POBS Rowset) It has VARCHAR type columns.
I've written absolutely zero code.
When I bind the two text fields, to two columns in the ORA RowSet, run the application, and when the page comes up, press the submit button, I get the following error:
"textField1" : Conversion Error Occurred
When I do the exact same thing with the POBS rowset, and press the submit button, I get no error.
Let me know how I can send you the project file, though you would have to use your own database instances.
Thanks Haroon - please email your project to CreatorFeedback AT sun DOT com and that will come to me!
Just sent you the file.
Got it - I'm going to start by changing it to do an insert on scott/tiger 's dept table for starter... so I added one addditonal text field for deptno and am binding the fields.
I noticed your code that's commented out does updates - I was under the impression that you were doing inserts? Please clarify which one to start with :)
Also I noticed that the concurrency isn't set on the rowsets to CONCUR_UPDATEABLE - so I'm wondering how the pointbase worked at all...?
Did you have a chance go through the insert/update/delete tutorial?
I actually ran the Insert/Update/Delete example and had the following experience:
For the project that I've sent you, I'm not even doing any insert/update. Just doing a submit causes the problem of "Conversion Error", even before an update/insert can be attempted. So Update/Insert is not an issue, and I've commented it out.
Just clicking on the submit button causes this problem, if the text fields have been bound to an Oracle rowset, and the problem does not occur occur if they are bound to a pointbase rowset.
I'm having the same problem with the "Conversion Error Occurred".
This occurs both with SQLServer and Oracle but not with Pointbase.
Has anybody else had this issue? Is anybody else using the databinding feature with Oracle/SQLServer ?
I'm having the same problem. I'm using a SQL Server database.
It's not just TextField components, though. The Conversion Error Occurred message pops up on every component I bind to the database - except OutputText of course. Bound OutputText works fine. It's only the editable fields that produce this error.
I've tried using char, varChar, Integer, you name it. No matter the data type of the database field, the same Conversion Error Occurred message pops up.
I could attach code samples, but it's easy to reproduce - I've done it over and over and over again building numerous small test applications to try to figure out how to get past this problem.
Here's how to replicate the problem.
1)Build any Master/Detail page using a listbox (or any other means) to select the master record and use OutputText, Text, and TextArea fields to show the detail.
2) Add an InlineMessage component for each of your Detail fields to display the 'Conversion Error Occurred' mesage when it happens
3) Add a button to submit the page.
4) Test the application and it will run just fine.
5) Bind the Detail fields to a RowSet from the database.
6) Test the application and it will fail. The Detail fields that are bound using OutputText will display the proper detail data for the master selected. However, all of the editable fields will give the error message.
Again, I could attach code examples, but this problem is way too easy to recreate.
This was not a problem with the Early Access release. I could bind fields to a SQL Server database just fine then.
Ahhh, I long for the good old days of the EA Release.....