Version: 0.1 beta 4 (using KDE 3.2.3, SuSE) Compiler: gcc version 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux (i686) release 2.4.20-4GB I just installed kexi from source. It didn't give any problems in compilation or installing. I was able to connect to a local postgre database. I've successfully created a table. Now I want to create a form for the table but every time I click on the Create Form button (either on the Project view or from the menu) It adds a new table, not a new form. Regards, Pedro
Pedro, Could you confirm that current kexi version from cvs solves this for you?
El Sábado, 30 de Octubre de 2004 20:01, se le ocurrió a Vd. decir lo siguiente: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=89381 > > > > > ------- Additional Comments From js iidea pl 2004-10-30 20:01 ------- > Pedro, Could you confirm that current kexi version from cvs solves this for > you? I updated my system since the bug report. However after installing the beta5 dated Nov. first the problem continues (kernel 2.6.5, kde 3.3.1 Suse linux 9.1). I'm going to check if the cvs version differs from the beta I downloaded. I'll get back to you as soon as I can. Regards, Pedro
> > I updated my system since the bug report. However after installing the > beta5 dated Nov. first the problem continues (kernel 2.6.5, kde 3.3.1 Suse > linux 9.1). > > I'm going to check if the cvs version differs from the beta I downloaded. > > I'll get back to you as soon as I can. > The problem persists with cvs. However I've tracked it down a little... The problem occurs when working on a postgresql database, not when working on a file. Is this a "feature" and not a bug? If forms aren't supported whe working against a database server maybe they shoud be grayed out?. Regards, Pedro
Now we know something. I'll check this case then. There's absolutely no reason not to supporting servers with forms.
I've encountered errors on saving a new form data on MySQL. Commited fixes for constructions like: SELECT 1 FROM (select kexi__objectdata.o_id from kexi__objectdata where _id=5 and o_sub_id is NULL) LIMIT 1; This at least fixes MySQL support, could you try it for pgsql?
I just downloaded cvs again, compile and the bug persists. But I did the following: -postgresql database using webmin: -open kexi_parts table: -found that there where 3 entries. The first entry (kexi/tables) and the third (kexi/Forms), had the same p_id=1 -changed manually p_id for kexi/forms to 3 -open kexi Now I DO HAVE FORMS. I looks like in the init process in postgres kexi_parts is not written correctly. Regards, Pedro
the same problem for newly created kexi projects?
> the same problem for newly created kexi projects? Yes. Again the kexi_parts table newly created has p_id=1 for the first entry (Tables) and the third (Formularios). It's weird that Tables and Queries are in English while Formularios is in Spanish (my local language), maybe this has something to do?. (By the way there's a translation error that I would correct if I knew where... Basicly, when you create a new project there's an option to create an empty database. "Empty database" in english could support two meanings with empty as an adjective or as a verb. The spanish translatior reads ("Vaciar base de datos") which correspond to the former: something like "Erase database". The correct text would be "Base de datos vacía".) Regards, Pedro
I do attach a portion that I believe is relevant from the console where I started kexi. It starts where kexi_parts is created an goes all along until the Formularios INSERT appears. ***************************************** KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: CREATE TABLE kexi__parts (p_id serial, p_name VARCHAR(200), p_mime VARCHAR(200), p_url VARCHAR(200)) NOTICE: CREATE TABLE creará una secuencia implícita "kexi__parts_p_id_seq" para la columna "serial" "kexi__parts.p_id" KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB: ******** CREATE TABLE kexi__final (p_id INTEGER , property TEXT, value BYTEA) KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: CREATE TABLE kexi__final (p_id INTEGER , property TEXT, value BYTEA) KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB: ******** CREATE TABLE kexi__useractions (p_id INTEGER , scope INTEGER, name TEXT, text TEXT, icon TEXT, method INTEGER, arguments TEXT) KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: CREATE TABLE kexi__useractions (p_id INTEGER , scope INTEGER, name TEXT, text TEXT, icon TEXT, method INTEGER, arguments TEXT) KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__parts(p_id,p_name,p_mime,p_url) VALUES (1,'Tables','kexi/table','http://koffice.org/kexi/') KexiDB (driver impl): EXECUTE SQL OK: OID was 46151 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__parts(p_id,p_name,p_mime,p_url) VALUES (2,'Queries','kexi/query','http://koffice.org/kexi/') KexiDB (driver impl): EXECUTE SQL OK: OID was 46152 KexiDB: ******** INSERT INTO kexi__db VALUES ('kexidb_major_ver','1') KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__db VALUES ('kexidb_major_ver','1') KexiDB (driver impl): EXECUTE SQL OK: OID was 46153 KexiDB: ******** INSERT INTO kexi__db VALUES ('kexidb_minor_ver','2') KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__db VALUES ('kexidb_minor_ver','2') KexiDB (driver impl): EXECUTE SQL OK: OID was 46154 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: COMMIT KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB (driver impl): pqxxSqlConnection::drv_closeDatabase kexi: --- DB 'Base_de_datos_nueva' created --- kexi: Connection::useDatabase(Base_de_datos_nueva,true) kexi: Connection::useDatabase(template1,false) KexiDB (driver impl): pqxxSqlConnection::drv_useDatabase: template1 KexiDB: TABLE id=-1 name='kexi__objects' caption='' desc='' o_id UNSIGNED Integer AUTOINC UNIQUE PKEY NOTNULL NOTEMPTY, o_type UNSIGNED Byte, o_name Text(200), o_caption Text(200), o_desc Text KexiDB: Connection::databaseNames(true) KexiDB (driver impl): pqxxSqlConnection::drv_getDatabaseList KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: SELECT datname FROM pg_database WHERE datallowconn = TRUE KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB (driver impl): pqxxSqlConnection::drv_closeDatabase KexiDB (driver impl): pqxxSqlConnection::drv_useDatabase: Base_de_datos_nueva KexiDB: TABLE id=-1 name='kexi__objects' caption='' desc='' o_id UNSIGNED Integer AUTOINC UNIQUE PKEY NOTNULL NOTEMPTY, o_type UNSIGNED Byte, o_name Text(200), o_caption Text(200), o_desc Text KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:select db_value from kexi__db where db_property='kexidb_major_ver' LIMIT 1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction0 KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:select db_value from kexi__db where db_property='kexidb_minor_ver' LIMIT 1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction1 kexi: --- DB 'Base_de_datos_nueva' used --- KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: BEGIN KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: DELETE FROM kexi__db WHERE db_property='project_caption' KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__db (db_property,db_value) VALUES ('project_caption','Base de datos nueva') KexiDB (driver impl): EXECUTE SQL OK: OID was 46155 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: DELETE FROM kexi__db WHERE db_property='project_desc' KexiDB (driver impl): EXECUTE SQL OK: OID was 0 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__db (db_property,db_value) VALUES ('project_desc',NULL) KexiDB (driver impl): EXECUTE SQL OK: OID was 46156 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: COMMIT KexiDB (driver impl): EXECUTE SQL OK: OID was 0 kexi: KexiProject::open(): checking project parts... KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:SELECT * FROM kexi__parts KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction2 KexiDB: Object ERROR: 0: KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:select db_value from kexi__db where db_property='project_caption' LIMIT 1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction3 KexiDB (driver impl): pqxxSqlCursor::storeCurrentRow: POSITION IS 1 KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:select db_value from kexi__db where db_property='project_desc' LIMIT 1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction4 KexiDB (driver impl): pqxxSqlCursor::storeCurrentRow: POSITION IS 1 kexi: KexiMainWindowImpl::slotProjectNew(): new project created --- kexi: KexiMainWindowImpl::initNavigator() kexi: KexiMainWindowImpl::initNavigator(): adding Tablas kexi: Manager::part( id = 1 ) kexi: Manager::part().. kexi: KexiTablePart::KexiTablePart() kexi: Manager::part(): Tablas provides data kexi: Manager::part(): fine! kexi: KexiProject::items() KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:SELECT o_id, o_name, o_caption FROM kexi__objects WHERE o_type = 1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction5 kexi: KexiMainWindowImpl::initNavigator(): adding Consultas kexi: Manager::part( id = 2 ) kexi: Manager::part().. kexi: Manager::part(): Consultas provides data kexi: Manager::part(): fine! kexi: KexiProject::items() KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:SELECT o_id, o_name, o_caption FROM kexi__objects WHERE o_type = 2 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction6 kexi: KexiMainWindowImpl::initNavigator(): adding Formularios kexi: Manager::part( id = -1 ) kexi: Manager::part().. kexi: KexiFormPart::KexiFormPart() kexi: WidgetLibrary::scan(): found factory: Widgets básicos kexi: WidgetLibrary::scan(): found factory: Wigdet de BD de Kexi kexi: WidgetLibrary::scan(): found factory: Widgets contenedores kexi: Manager::part(): Formularios doesn't provide data kexi: Manager::part(): fine! kexi: KexiProject::items() KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:SELECT o_id, o_name, o_caption FROM kexi__objects WHERE o_type = -1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction7 kexi: KexiMainWindowImpl::initNavigator(): adding Relaciones kexi: Manager::part( id = -1 ) kexi: Manager::part(): cached: Relaciones kexi: Manager::part(): fine! kexi: KexiProject::items() kexi: Manager::part( id = 1 ) kexi: Manager::part(): cached: Tablas kexi: Manager::part(): fine! kexi: Manager::part( id = -1 ) kexi: Manager::part(): cached: Formularios kexi: Manager::part(): fine! kexi: Manager::part( id = -1 ) kexi: Manager::part(): cached: Formularios kexi: Manager::part(): fine! kexi: KexiMainWindowImpl::newObject(): schema: 0x837a600 kexi: KexiMainWindowImpl::newObject(): fieldlist: 0x83a8c40 KexiDB (driver impl): pqxxSqlConnection::drv_executeSQL: INSERT INTO kexi__parts(p_name,p_mime,p_url) VALUES ('Formularios','kexi/form','http://') KexiDB (driver impl): EXECUTE SQL OK: OID was 46157 kexi: KexiMainWindowImpl::newObject(): insert success! KexiDB (driver impl): PQXXSQLCURSOR: constructor for query statement KexiDB (driver impl): pqxxSqlCursor::drv_open:select p_id from kexi__parts where oid=46157 LIMIT 1 KexiDB (driver impl): pqxxSqlCursor::drv_open: trans. commited: cursor_transaction8 ********************************************* Regards, Pedro
-Pedro, could you execute something like "INSERT INTO kexi__parts(p_name,p_mime,p_url) VALUES ('Formularios','kexi/form','http://')" by hand in psql? Looks like sequence that is declared doesnt work as expected if we are ommiting p_id? Weird because inserting new values into pgsql table (in table data view) created by kexi does the same. Does this work for you? -comment for translators will be added: i18n("'empty' is an adjective here", "Empty database")
> -Pedro, could you execute something like "INSERT INTO > kexi__parts(p_name,p_mime,p_url) VALUES > ('Formularios','kexi/form','http://')" by hand in psql? Looks like sequence > that is declared doesnt work as expected if we are ommiting p_id? Weird > because inserting new values into pgsql table (in table data view) created > by kexi does the same. Does this work for you? Ok. I found it. When kexi__parts is created the p_id field is declared as serial, but it is not unique, so repeated values are allowed. The sequence kexi__parts_p_id_seq is created and set to 0, so that the next inserted value that uses the sequence would be 1. If you insert data providing a value for p_id, the sequence is not used-updated. I did what you said several times and the p_id field was autoincremented. But then I did an INSERT INTO kexi__parts(p_id,p_name,p_mime,p_url) VALUES (2, 'Formularios','kexi/forms','http://') and this was inserted with a repeated p_id value of 2. I suggest making the p_id field unique and always use the sequence not setting p_id field directly. Regards, Pedro
-Problem with weird 'p_name' column's value is fixed now in cvs. -problem with p_id will be fixed this week, but in general case we'll need to use setval(sequence); see http://www.postgresql.org/docs/7.4/interactive/functions-sequence.html ...for pgsql, because: we're setting this 'autonumber' column either by hand and using sequence.
CVS commit by staniek: Main - proposed fix for "Create new Form creates a new table", please test BUG: 89381 M +12 -3 keximainwindowimpl.cpp 1.166 --- koffice/kexi/main/keximainwindowimpl.cpp #1.165:1.166 @@ -2564,6 +2564,13 @@ bool KexiMainWindowImpl::newObject( Kexi return false; - KexiDB::FieldList *fl = ts->subList("p_name", "p_mime", "p_url"); - kdDebug() << "KexiMainWindowImpl::newObject(): fieldlist: " << fl << endl; + //temp. hack: avoid problems with autonumber + // see http://bugs.kde.org/show_bug.cgi?id=89381 + int p_id = 3; //min is == 3 + if (project()->dbConnection()->querySingleNumber("SELECT max(p_id) FROM kexi__parts", p_id)) + p_id++; + +// KexiDB::FieldList *fl = ts->subList("p_name", "p_mime", "p_url"); + KexiDB::FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url"); + kexidbg << "KexiMainWindowImpl::newObject(): fieldlist: " << (fl ? fl->debugString() : QString::null) << endl; if (!fl) return false; @@ -2574,5 +2581,7 @@ bool KexiMainWindowImpl::newObject( Kexi // for (QStringList::ConstIterator it=sl.constBegin();it!=sl.constEnd();++it) // kexidbg << *it << " " << info->ptr()->property(*it).toString() << endl; - if (!project()->dbConnection()->insertRecord(*fl, QVariant(info->ptr()->untranslatedGenericName()), + if (!project()->dbConnection()->insertRecord(*fl, + QVariant(p_id), + QVariant(info->ptr()->untranslatedGenericName()), QVariant(info->mime()), QVariant("http://www.koffice.org/kexi/"))) return false;
> Main > - proposed fix for "Create new Form creates a new table", > please test > BUG: 89381 > > > M +12 -3 keximainwindowimpl.cpp 1.166 Compilation fails in my system. ******************************************************************** make[2]: Entering directory `/home/pedro/src/kexisrc/koffice/kexi/main' if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../lib/kofficeui -I../../kexi -I../../kexi/core -I../../kexi/core -I../../kexi/main -I../../kexi/main/projectWizard -I../../kexi/main/startup -I../../kexi/main/startup -I../../kexi/widget/propertyeditor -I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions -include ../../kexi/kexi_export.h -MT keximainwindowimpl.lo -MD -MP -MF ".deps/keximainwindowimpl.Tpo"-c -o keximainwindowimpl.lo keximainwindowimpl.cpp; \ then mv -f ".deps/keximainwindowimpl.Tpo" ".deps/keximainwindowimpl.Plo"; else rm -f ".deps/keximainwindowimpl.Tpo"; exit 1; fi keximainwindowimpl.cpp: In member function `void KexiMainWindowImpl::Private::updatePropEditorDockWidthInfo()': keximainwindowimpl.cpp:260: warning: unused variable `KDockWidget*dw' keximainwindowimpl.cpp: In member function `void KexiMainWindowImpl::initPropertyEditor()': keximainwindowimpl.cpp:1041: warning: unused variable `KDockWidget*dw' In file included from keximainwindowimpl.cpp:2907: keximainwindowimpl.moc: In member function `virtual bool KexiMainWindowImpl::qt_invoke(int, QUObject*)': keximainwindowimpl.moc:361: error: `slotMigrationWizard' undeclared (first use this function) keximainwindowimpl.moc:361: error: (Each undeclared identifier is reported only once for each function it appears in.) make[2]: *** [keximainwindowimpl.lo] Error 1 make[2]: Leaving directory `/home/pedro/src/kexisrc/koffice/kexi/main' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/pedro/src/kexisrc/koffice/kexi/main' make: *** [all-recursive] Error 1 ****************************************************************************** Regards, Pedro
Please remove keximainwindowimpl.moc and recompile main/ directory
fix commited to cvs : keximainwindow.cpp; please update
update keximainwindowimpl.h , keximainwindowimpl.cpp
> update keximainwindowimpl.h , keximainwindowimpl.cpp Jaroslaw... I deleted the full source tree, logged in to cvs, downloaded everything again, but I can't find Makefile.cvs to recreate the build environment... I must be doing something wrong but I don't see where... Can you help with this? Regards, Pedro
Makefile.cvs and other files in koffice/ dir are in cvs: go to koffice/ and type cvs up -l (-l stands for local, not recursive)
Again compilation errors... ************************************************************ /usr/lib/qt3/bin/moc ./migratemanager_p.h -o migratemanager_p.moc if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../kexi/core -I../../kexi -I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -I/usr/include/pgsql -I/usr/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions -include ../../kexi/kexi_export.h -MT migratemanager.lo -MD -MP -MF ".deps/migratemanager.Tpo" -c -o migratemanager.lo migratemanager.cpp; \ then mv -f ".deps/migratemanager.Tpo" ".deps/migratemanager.Plo"; else rm -f ".deps/migratemanager.Tpo"; exit 1; fi make[1]: *** No hay ninguna regla para construir el objetivo `../../kexi/main/libkeximain.la', necesario para `libkeximigrate.la'. Alto. make[1]: Leaving directory `/home/pedro/src/kexisrc/koffice/kexi/migration' make: *** [all-recursive] Error 1 **************************************************************** Which in english would translate to something like "Thre are no rules to buil libkeximain.la needed for libkeximigrate.la". Regards, Pedro
Weird because it's fixed. Have you got cvs account or just using anonymous one? If you're using anonymous, note there is delay between what is in REAL cvs and what you can see, so try update later (5 hours?). Sorry.
> Have you got cvs account or just using anonymous one? anonymous... > If you're using anonymous, note there is delay between what is in REAL cvs > and what you can see, so try update later (5 hours?). Sorry. Ok... I can wait ;) Regards, Pedro