Getting following error
028 Debug: select '?' as item_id, '?' as item_name, sequence as sequences, status from LIST_ANGINA
07:34:38.028 Debug: parameter1 : value ANGINA_ID
07:34:38.028 Debug: parameter2 : value ANGINA_DESCRIPTION
07:34:38.029 Error: unable to set column column1 with type CHAR from field with type CHAR, types incompatible? - Invalid column index
029 Error: Fetch error: unable to set column column1 with type CHAR from field with type CHAR, types incompatible? - Invalid column index
07:34:38.030 Error: Wrapped com.ebasetech.xi.exceptions.FormRuntimeException: Fetch error: unable to set column column1 with type CHAR from field with type CHAR, types incompatible? - Invalid column index (CCORE_LIST_BP#22)
Could anyone give me pointers as to where to look ?
Invalid column index
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
I guess you are trying to substitute database column names dynamically into the SQL statement and have them returned as item_id and item_name. To do this dynamic substitution you need to click the Dynamic Sql checkbox for both of these dynamically substitutable column names - column1 and column 2? So the database resource should have 4 resource fields (ignoring any other columns you might need) and these are all mapped to form fields.
Resource fields
column1 Dynamic Sql set to a valid column name e.g."ANGINA_ID"
column2 Dynamic Sql set to a valid column name e.g. "ANGINA_DESCRIPTION"
item_id After fetch, will contain the selected value from the DB
item_name After fetch, will contain the selected value from the DB
Resource fields
column1 Dynamic Sql set to a valid column name e.g."ANGINA_ID"
column2 Dynamic Sql set to a valid column name e.g. "ANGINA_DESCRIPTION"
item_id After fetch, will contain the selected value from the DB
item_name After fetch, will contain the selected value from the DB
0 x
-
- Ebase User
- Posts: 29
- Joined: Mon Nov 02, 2015 7:19 pm
Thanks Jon. Just on the same note. I have a database resource as table and I have native SQL configured for select, update, delete and insert. When I am doing following insert
the code it generate has quotes with list name so it gives me invalid table name. The generated query looks like this.
How do I tell Ebase to remove the quotes which I didn't put in the first place. See insert code above. Thanks for the help
Code: Select all
insert into &&list_name values (&&item_id,&&item_name,&&sequences, &&status)
Code: Select all
insert into 'LIST_ANGINA' values (6,'CCS Class 5',6, 'Active')
0 x
-
- Ebase User
- Posts: 29
- Joined: Mon Nov 02, 2015 7:19 pm
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
I think it's valid to have quotes around the table name but it should then instruct the database to treat the name as case sensitive i.e. it should work so long as your table is actually named LIST_ANGINA in upper case.
To answer your question I think you can con the system into removing the quotes by changing the type of the list_name resource field in the Database Resource to INTEGER. This is a bit of a hack but I think it will work.
To answer your question I think you can con the system into removing the quotes by changing the type of the list_name resource field in the Database Resource to INTEGER. This is a bit of a hack but I think it will work.
0 x
-
- Ebase User
- Posts: 29
- Joined: Mon Nov 02, 2015 7:19 pm
Who is online
Users browsing this forum: No registered users and 3 guests