Hi,
Let me explain my situation.
I imported a solution that uses a view on the database and when i did i got a warning telling me that servoy would treat that view as a table. It imported it and my solution worked fine. Then i made some changes to that view and to the solution and when i want to reimport the solution servoy gives me a repository exception telling me he wants to update the table (the view) but that he cannot find the table. So i tried a couple of things including changing the database on my server making the view in it, the same way i have it on development were it works just fine, so after that i tried to import the solution (now it wouldnt be necessary to update anything cause the view updated is there) but it gave me the same error.
That makes me think (please correct me if im wrong) that servoy is keeping some kind of record or log or is storing somewhere info about the databases (repository i think) that in spite of having those changes done to the database, wasnt updated and still wants to update that table(view) when i want to import the solution.
What came to my mind was that if i erased the conection between the application server and the database that info would also be deleted, so when i recreate the conection to the updated database i would have no problems importing (as i do on development). But i couldnt delete that conection.
What i did was that I log to the administrator, go to database servers, disable the database, restart the server and then delete the conecction. I get a message saying it was succesfully deleted but when i restart the app server the database conection reappears like it wasnt deleted. Im i doing something wrong? how am i supposed to do this?
Would this solve my problem? otherwise how can i erase or update that info?
Thanks in advance
nromeou:
So i tried a couple of things including changing the database on my server making the view in it, the same way i have it on development were it works just fine, so after that i tried to import the solution (now it wouldnt be necessary to update anything cause the view updated is there) but it gave me the same error.
nromeou,
That is indeed the correct procedure.
If the same set of columns is in the database (regardless whether it is a table or a view), Servoy does not try to change the table/view and use it as is.
You do need to restart Servoy Server for it to pick up the datamodel changes.
What is the error you got?
Rob
ive just changed the database on the server, now it has the same db i have here local on development but when i import the solution i get this
[info] Added column with name ‘descr’ to table ‘listaprop’ in server ‘intra’.
[info] Added column with name ‘dir_real’ to table ‘listaprop’ in server ‘intra’.
[info] Added column with name ‘dir_web’ to table ‘listaprop’ in server ‘intra’.
[info] Added column with name ‘dormitorios’ to table ‘listaprop’ in server ‘intra’.
[info] Added column with name ‘banios’ to table ‘listaprop’ in server ‘intra’.
[info] Added column with name ‘area_edificable’ to table ‘listaprop’ in server ‘intra’.
[info] Added column with name ‘propietario_id’ to table ‘listaprop’ in server ‘intra’.
[error] com.servoy.j2db.persistence.RepositoryException: com.sybase.jdbc3.jdbc.SybSQLException: SQL Anywhere Error -141: Table ‘listaProp’ not found
“listaProp” is the views name.
This exception means that Servoy is trying to use the view.
The view was returned by the driver (otherwise Servoy would not have used it) but somehow it is not accessible.
Try logging in in the database using a java tool (like for instance squirrelsql) with the same jdbc url and credentials and run ‘select * from listaProp’
Rob