erich.wanker Posted March 20, 2014 Posted March 20, 2014 Hello Folks, at runtime, i add fields to my firebird 2.5 sql database .. Problem: ... i can access the new fields only after restart of webserver in uniservermodule - i have ZConnection1 (ZeosLib Component to access the firebird sql Database) in unimainmodule - i have different ZQuerys and TDatasource Comonents at runtime - i add field with: ASQL = "Alter Table add field ..."; uniservermodule.ZConnection1.ExecuteDirect( ASQL ) ; if i create a new table with a lot of fields - i can access the fields without restart of webserver if i create a new field in a existing table - i must restart the webserver to access the field Has anyone a solution for this problem ? ThanX Quote
Administrators Farshad Mohajeri Posted March 20, 2014 Administrators Posted March 20, 2014 in uniservermodule - i have ZConnection1 Put it on MainModule. ServerModule is not the right place for DB related stuff. Quote
erich.wanker Posted March 20, 2014 Author Posted March 20, 2014 Hello Farshad, if i put the ZConnection to MainModule - different clients see no "new records" of other clients since the client restarts the unigui.dll in webbrowser .. Quote
Administrators Farshad Mohajeri Posted March 20, 2014 Administrators Posted March 20, 2014 Hello Farshad, if i put the ZConnection to MainModule - different clients see no "new records" of other clients since the client restarts the unigui.dll in webbrowser .. It is related to your database engine and how your queries are designed. Perhaps your transactions remain uncommitted after you post data? As I said above you should never put DB stuff on ServerModule. Quote
Oliver Morsch Posted March 20, 2014 Posted March 20, 2014 Old problem ?! http://forums.unigui.com/index.php?/topic/3683-sql-statement-alter-table-problem/?hl=zconnection Quote
erich.wanker Posted March 20, 2014 Author Posted March 20, 2014 yes .. old problem ... no solution since now .. now I put the ZConnection (Version 7.1.2) on MainModule .. AutoCommit = true TransactIsolationLevel = tiReadCommited / -> now i see records from other clients .. the "TransactIsolationLevel" was the point ;-) ..but the new fields created with "Alter Table add feldname char(200) .." are just accessible after restart of Apache ... Quote
Oliver Morsch Posted March 20, 2014 Posted March 20, 2014 yes .. old problem ... no solution since now .. now I put the ZConnection (Version 7.1.2) on MainModule .. AutoCommit = true TransactIsolationLevel = tiReadCommited / -> now i see records from other clients .. the "TransactIsolationLevel" was the point ;-) That's what i wrote in post # 8 in other thread ..but the new fields created with "Alter Table add feldname char(200) .." are just accessible after restart of Apache ... Try this: Close all(!) connections and transactions and reopen the database. Don't add fields, if the table is open on any client. Quote
erich.wanker Posted March 20, 2014 Author Posted March 20, 2014 hello Oliver, now it works :-) ... the ZConnection.disconnect /connect .. and open all querys again was the solution :-) ThanX very much and nice greetings from gastein Erich Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.