|
| Adding new column to db in WebDev 19 |
| Iniciado por guest, 08,may. 2015 00:11 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 08,mayo 2015 - 00:11 |
I am working on a WebDev 19 application that I did not originally develop, but that needs to be updated to split a single form field into two distinct fields. This form writes data back to a SQL Express 2014 database, which is connected to via the native SQL access method in WebDev.
I'm not entirely sure of the right procedure for adding new fields. What I've tried so far is adding a field directly to the database through a SQL management application, and then going to WebDev's Analysis tab and selecting Synchronization -> "Update the analysis from the external databases". This generally causes the application to crash, but when I start it back up it does appear the changes have been made.
However, it also makes a number of other changes which I would like to avoid. All I want to do is add in two new columns to the database, but the wizard insists on updating and adding a number of new fields including a lot of "missing_index" fields. The end result is that these updates break the functionality of the form and the queries fail. Prior to making any changes the form functions as expected.
Can anyone provide some insight or assistance in adding new fields in the simplest way possible? Any help is greatly appreciated, thanks in advance. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,mayo 2015 - 15:52 |
Hi Sam
I'm not quite sure when using sql Express, but normally I just add extra fields in the analyse and let Webdev do the Work about adding the field in the nessasary databases. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,mayo 2015 - 17:57 |
Our approach is never sync from the db to the Analysis, you will have a lot of problems.
We add the new column in the Analysis and we wrote some code to do the changes in the db. this is done by one Windev program, we run this program everytime we install any new version. The program checks if the Analysis as changed and generate/run some sql code to do the changes. The easier way to do this is to rename the existing table in the db, let windev create the table with the new definition (hcreation) and use one insert to move the data from the old table definition to the new one(insert into my_table (fld1,fld,fl3,.... select fldx,fldy,fldz,... from my_old_table)
we are doing something more complex, like alter table and so on but you can always start with this simple solution and complete it if your requirements evolve. |
| |
| |
| | | |
|
| | | | |
| | |
|