Hi all,
I have just done a test conversion of one of my large projects from 3.1.6 to 3.5.1 and have come across the following problem:
I have a dataset with one column, generated by a query:
dataset2.getColumnAsArray(1)
[26623,26620,26619,26618,26617,26609,26610,26608,26606,26605,26545,26548,26583,26604,26601,26597,26599,26598,26596,26595,26594,26593,26592,26589,26590]
If I use this dataset to load records, if fails:
currentcontroller.showRecords(dataset2);
I get
com.servoy.j2db.dataprocessing.DataException: ERROR: IN types integer and character varying cannot be matched
In the log I find
2007-09-17 07:40:05,126 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - select document_id, document_type, document_date, document_customer_id, document_customer_acc_no, document_sales_order_id, document_order_taken_by, document_notes, document_paid, modified_timestamp, created_timestamp, document_number, document_address_shipto, document_address_invoiceto, document_terms, document_message, document_person_id, document_company_id, document_customer_name, document_payment_type, document_card_type, document_amount_tendered, document_locked, document_date_from, document_date_to, document_outstanding, transaction_type_code_sales, transaction_type_code_payments, transaction_type_code_carriage, document_account_goods_taken_by, document_location_id, total_gross, document_print_options, document_type_id, document_paid_text, total_turnover, document_student_discount from acc_documents where document_id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) limit ?
org.postgresql.util.PSQLException: ERROR: IN types integer and character varying cannot be matched
Looked a bit further into this by trying
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), 'SELECT document_id FROM acc_documents LIMIT 10', null, 10);
currentcontroller.showRecords(dataset);
which fails. While
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), 'SELECT document_id FROM acc_documents LIMIT 1', null, 10);
currentcontroller.showRecords(dataset);
Works.
My pk is a ‘serial’, which means an integer with a sequence.
nextval('acc_documents_document_id_seq'::regclass)
Any ideas?
PostgreSQL 8.2.4 on Mac OS X 10.4.10
PostgreSQL driver as shipped with servoy and have also tried with
postgresql-8.2-505.jdbc3.jar