Hi all,
Just came across this gotcha:
-
Create a new database table using Servoy.
-
Write some globally scoped scripts manipulating the table data, but don’t create any form based on the table.
-
Export and import on test server.
-
The scripts will fail because Servoy does not export the new table as pat of the solution.
-
Create a dummy form based on new table
-
Export and import on test server.
-
The scripts run OK.
Servoy 6.1.4, Developer Mac OS X latest, Java 7 latest… Server Windows 2008…
C
Harjo
2
this is because the server is not referenced. referenced mean, referenced by relation or form. pointing to code is not a reference ![Very Happy :D]()
I’m getting the foundset of the table in my code.To me that is a reference in the same was as a relation is a reference…
function user_email_get(servoy_user_name) {
var fs = databaseManager.getFoundSet("demo_server","user_data");
var query = "SELECT user_data_id FROM user_data WHERE user_name = ?";
var args = new Array();
args.push(servoy_user_name);
if(fs.loadRecords(query, args)) {
if(fs.getSize()) {
/** @type {JSRecord<db:/demo_server/user_data>} */
var user = fs.getRecord(1);
return user.email_address;
} else {
return '';
}
} else {
return '';
}
}