Formless tables not exported in Solution

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Formless tables not exported in Solution

Postby swingman » Tue Jun 04, 2013 1:58 pm

Hi all,

Just came across this gotcha:

1. Create a new database table using Servoy.
2. Write some globally scoped scripts manipulating the table data, but don't create any form based on the table.
3. Export and import on test server.
4. The scripts will fail because Servoy does not export the new table as pat of the solution.

5. Create a dummy form based on new table
6. Export and import on test server.
7. The scripts run OK.

Servoy 6.1.4, Developer Mac OS X latest, Java 7 latest... Server Windows 2008...

C
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Formless tables not exported in Solution

Postby Harjo » Tue Jun 04, 2013 2:08 pm

this is because the server is not referenced. referenced mean, referenced by relation or form. pointing to code is not a reference :D
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Formless tables not exported in Solution

Postby swingman » Tue Jun 04, 2013 2:15 pm

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

Code: Select all
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 '';
   }
}
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Formless tables not exported in Solution

Postby Harjo » Tue Jun 04, 2013 5:03 pm

swingman wrote:To me that is a reference in the same was as a relation is a reference...


yup, but not for Servoy! :roll:
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 8 guests