erich.wanker Posted March 20, 2014 Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 20, 2014 Administrators Share Posted March 20, 2014 in uniservermodule - i have ZConnection1 Put it on MainModule. ServerModule is not the right place for DB related stuff. Link to comment Share on other sites More sharing options...
erich.wanker Posted March 20, 2014 Author Share 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 .. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 20, 2014 Administrators Share 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. Link to comment Share on other sites More sharing options...
Oliver Morsch Posted March 20, 2014 Share Posted March 20, 2014 Old problem ?! http://forums.unigui.com/index.php?/topic/3683-sql-statement-alter-table-problem/?hl=zconnection Link to comment Share on other sites More sharing options...
erich.wanker Posted March 20, 2014 Author Share 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 ... Link to comment Share on other sites More sharing options...
Oliver Morsch Posted March 20, 2014 Share 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. Link to comment Share on other sites More sharing options...
erich.wanker Posted March 20, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now