Jump to content

Firebird SQL - alter Table add ... access only after restart of webserver


Recommended Posts

Posted

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

 

Posted

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 ..

  • Administrators
Posted

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.

Posted

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 ...

Posted

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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...