Hot Topic (More than 10 Replies) Saving form erasing data (Read 2808 times)
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Saving form erasing data
Sep 28th, 2006 at 12:36pm
Print Post Print Post  
I have a database application that gets saved under different names so that each one can include separate data for a separate client.  I have been working on the original form, and when I get done, I copy that programming data to Word, then from Word, copy it to the other copies of the database.  Although when I get the programming pasted into the copy database, I reconcile it.  Going in to the same file in Sesame (Not Sesame Designer), some of the programming isn't working like it did in the original database.  For example, my XLookup commands don't lookup any information, and when I save for form, the value I enter to be looked up gets erased.  Angry

I really hope someone can tell me what I am doing wrong, and/or how to fix it.   Wink

Thank You.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #1 - Sep 28th, 2006 at 1:13pm
Print Post Print Post  
If all of these applications are identical, you may be better served using one application and placing a "client" element on the form, and using a query to work on each client in turn.

If all of these applications are identical you can use the "Export All to Text File" and the "Import from Text File" options in the File pulldown menu in the programming editor to export your programming from the master application and import it into each of the copy applications. In any case, do not use MSWord, it is not an ASCII text editor and may be munging your code. It is not made for *any* kind of programming and should not be used for ASCII data. Use a text editor instead of a word processor.

If all of these applications are identical in design, but different in data, you can simply reconcile to the others from the master DSR file, without having to cut and paste any code at all.

Do your XLookups have the filename of the application in them? If so, replace these with @Fn so they will work in any application even if it has a different name.

If you use @XLookup instead of using XLookup, you can return the value to a variable and check its value (and the value of @Error) before you assign the value to an element and overwrite the existing value. If the there is a choice between using a function and a subroutine, that are otherwise identical, always use the function and return the value to a variable.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #2 - Sep 28th, 2006 at 1:37pm
Print Post Print Post  
I agree with The Cow re using a single application and/or single dsr.

I have a customer who also likes to have a separate database for each client, but they are all meant to behave identically. I keep a Master dsr. When I make a programming change, he simply reconciles the Master dsr to each Client db, one at a time.  Each Client db contains a couple of GlobalValues for those few things that are different, such as Client Name, and the programming makes use of those where needed.

It works very nicely.  Smiley
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #3 - Sep 28th, 2006 at 3:12pm
Print Post Print Post  
Thank you both for your quick responce and ideas.  Although I can not reconcile some of the data straight to another database for a few changed cannot be unchanged, but the programming should be the same.  I backed up all my files, exported all programming data to text file.  I opended another database in Designer and deleted all programming.  Saved, and the imported programming from text file.  Saved, and reconciled with the .db file.  When I opened it to try it, I was still getting the same results.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #4 - Sep 28th, 2006 at 3:18pm
Print Post Print Post  
Did you try the other suggestions regarding using @FN or looking for naming differences?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #5 - Sep 28th, 2006 at 4:09pm
Print Post Print Post  
I don't think that @FN applies to my @XLookup s.  I am having something looked up from outside of this application.  That way one application holds the same data for dozens of applications to access.  For Example:

Code
Select All
vlook = @XlookupSourceList("data\worksheet.db",ThisElement, "worksht!work sheet", "DESC1;DESC2;DESC3;DESC4;DESC5;DESC6;DESC7;DESC8;DESC9;DESC10;DESC11;DESC12;DESC13;F0038;F0043;F0048;Procedure")
 


And
Code
Select All
vemp = @XLookup("data\empno.db", ThisElement, "empno!Employee No.", "Employee Name")
 



  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #6 - Sep 28th, 2006 at 4:24pm
Print Post Print Post  
Immediately after your @XLookup, place the following line.

WriteLn(@Error)

After you run this, does the popup window say "yes" or "no"?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #7 - Sep 28th, 2006 at 4:47pm
Print Post Print Post  
That is odd.  The one looking up the worksht database says NO.
The one looking up EmpNo, shows nothing at all. and gets removed on the save.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #8 - Sep 28th, 2006 at 4:51pm
Print Post Print Post  
Are you sure that the one looking up EmpNo is running at all? I'm not sure what "it" gets removed on "the save" but perhaps you have an If condition that is false and preventing the EmpNo lookup?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #9 - Sep 28th, 2006 at 5:16pm
Print Post Print Post  
Code
Select All
var vemp as string

vemp = @XLookup("data\empno.db", ThisElement, "empno!Employee No.", "Employee Name")
writeLn(@Error)
Calibrated by Technician0 = vemp
 



This is the complete code that is in EmpNo Element Programming on Element Change.  I enter in a number for example "53" and it should put "James Jones" in Calibrated by Technician0 textbox.  Nothing happens to Calibrated by Technician0 and when i save record, EmpNo textbox that had "53" in it disappears.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #10 - Sep 28th, 2006 at 5:23pm
Print Post Print Post  
It sounds like the EmpNo element is Unbound. That would cause both the "nothing happens" and the "disappearing value" behavior.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #11 - Sep 28th, 2006 at 5:41pm
Print Post Print Post  
Well that was exactly it.  Now that gives me one more thing to check first.  Thank You.
  
Back to top
 
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #12 - Sep 28th, 2006 at 5:46pm
Print Post Print Post  
Okay.  I replaced the element to be bound to itself.  I saved it to the .db file, and it wasn't bound anymore.    I don't know how it is getting unbound.  Any clues?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #13 - Sep 28th, 2006 at 5:50pm
Print Post Print Post  
Calibrate1 wrote on Sep 28th, 2006 at 5:46pm:
Okay.  I replaced the element to be bound to itself.  I saved it to the .db file, and it wasn't bound anymore.    I don't know how it is getting unbound.  Any clues?



Elements aren't bound to elements. They are bound to a field in the underlying database. The element and the field may have the same name, but they are not the same thing.

In Designer, click the EmpNo element to select it.
On the Property Editor, go to the Other Tab.
From the Bound To dropdown, choose the field name whose data you want to see in the EmpNo element.
Click the Set button next to Bound To.
Check the Other Tab in the Property Viewer to make sure EmpNo is Bound To the correct field.
Save the Layout.
Reconcile to the correct db.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #14 - Sep 29th, 2006 at 12:24pm
Print Post Print Post  
I was able to get "empno" element bound to "!empno".  Saved to the correct db, and it worked perfectly.
This morning I opened the db and the first record that I added wouldn't complete the lookup. Shocked  I saved my records so I could look at the others.  Now all the records I corrected yesterday in the empno field are empty. Cry  How can a text file, without going into designer, can loose what it is bound to?  Thank you for all your patience working this out with me.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #15 - Sep 29th, 2006 at 12:35pm
Print Post Print Post  
It can't. Although, I'm not sure what you mean by a "text" file. I suspect that, with all the different copies of your database floating around, you are not using the copy you think you're using.

If you are running client-server, you may be accidentally using a local copy sometimes, and another copy on the server at other times.

If not, you may simply have multiple copies of your database in different folders.

I've also seen cases where someone had a misconfigured backup program that was carefully overwriting their day's work every day with an earlier backup copy.

If you can't figure out which copy of which database youare using, your best bet is probably to contact Support at this point. The immediacy of a telephone is a big help wih this type of troubleshooting.
http://www.lantica.com/Company/contact.html
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #16 - Sep 29th, 2006 at 2:23pm
Print Post Print Post  
Calibrate1,

I am not sure how your running Sesame (Single user or Client Server) but I have found that if I reconcile my files on a development machine and then copy it back to my server, even though no users are logged on, If I do not use server administration to stop the server my new changes are not implemented.

Thought I would throw this out just incase this might be affecting you.

Best of luck and please keep us posted!
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #17 - Sep 29th, 2006 at 2:30pm
Print Post Print Post  
BOBSCOTT wrote on Sep 29th, 2006 at 2:23pm:
Calibrate1,

I am not sure how your running Sesame (Single user or Client Server) but I have found that if I reconcile my files on a development machine and then copy it back to my server, even though no users are logged on, If I do not use server administration to stop the server my new changes are not implemented.



If your server has that application loaded, copying over its file would be a bad thing to do. Imagine if you had a file open in MSWord and while it was loaded you copied over that .doc file. MSWord is likely to overwrite your changes on the next save, at the very least.

If you are copying a design copy into your production environment - always place the design copy in a safe directory (where you know it is not being accessed by the server).
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: Saving form erasing data
Reply #18 - Sep 29th, 2006 at 2:41pm
Print Post Print Post  
Sesame runs on my machine.  If anyone else uses it, they access my computer to do it.  I think that I have corrected the problem, although I am watching out for any errors.  Thank you all for your help.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #19 - Sep 29th, 2006 at 2:54pm
Print Post Print Post  
[quote author=The Cow link=1159446976/0#17 date=1159540229
If your server has that application loaded, copying over its file would be a bad thing to do. Imagine if you had a file open in MSWord and while it was loaded you copied over that .doc file. MSWord is likely to overwrite your changes on the next save, at the very least.

If you are copying a design copy into your production environment - always place the design copy in a safe directory (where you know it is not being accessed by the server).
[/quote]


I am confused (I know, nothing new)

If no users are logged on and only the System database is showing in the application open window (actually mine usually shows System Database and US Zip Codes) but my application is not showing in the open application window, doesn’t this mean my application is not loaded?

The steps I always use to update changes are:

I use save as when no other users are on the system to create my files to reconcile.
I copy my newly created files to my development machine.
I use Sdesigner to reconcile my files.
I move my current dat and db files from my server to a directory I call previous.
I rename my newly reconciled files on my development machine to the correct name.
I copy the dat and db files to my Sesame\data directory on my server

I thought when someone logs into the application my new changes would be active, It only has changes if I completely stop Sesame server and restart it.

Calibrate1 – Sorry I did not mean to Hi-Jack your post!
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #20 - Sep 29th, 2006 at 2:59pm
Print Post Print Post  
Quote:
I thought when someone logs into the application my new changes would be active, It only has changes if I completely stop Sesame server and restart it.


The server will not list apps it has loaded if they were loaded by an "X" command. In 1.x.x, you cannot force a reload of one of these apps without restarting Sesame Server.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Saving form erasing data
Reply #21 - Sep 29th, 2006 at 3:18pm
Print Post Print Post  
Quote:
The server will not list apps it has loaded if they were loaded by an "X" command.


Actually the Sesame Server will list an application that is loaded by an X command. It will be listed as the path given to the X command until that application is loaded by an actual client and then the application title will be displayed instead of the path.

Quote:
In 1.x.x, you cannot force a reload of one of these apps without restarting Sesame Server.


This is correct. If an application shows up on the list of Open Applications then the only way to re-load it from the Hard drive is to restart the Sesame Server.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Saving form erasing data
Reply #22 - Sep 29th, 2006 at 3:20pm
Print Post Print Post  
Mark and Ray,

Thanks for the education.

I am adding to my list of classes that I need to take, a Sesame Administrators course. One that teaches me the proper methods to maintain, back-up, document and keep the overall wellbeing of my Sesame application and network running to its fullest potential. 
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Saving form erasing data
Reply #23 - Sep 29th, 2006 at 3:30pm
Print Post Print Post  
BOBSCOTT wrote on Sep 29th, 2006 at 2:54pm:
If no users are logged on and only the System database is showing in the application open window (actually mine usually shows System Database and US Zip Codes) but my application is not showing in the open application window, doesn’t this mean my application is not loaded?


Yes that means that at that point in time your application is not loaded on the Sesame Server

Quote:
The steps I always use to update changes are:

I use save as when no other users are on the system to create my files to reconcile.
I copy my newly created files to my development machine.
I use Sdesigner to reconcile my files.
I move my current dat and db files from my server to a directory I call previous.
I rename my newly reconciled files on my development machine to the correct name.
I copy the dat and db files to my Sesame\data directory on my server

I thought when someone logs into the application my new changes would be active, It only has changes if I completely stop Sesame server and restart it.


In a perfect world with perfect users those steps would work fine. I just followed those steps here with Customers and the new changes were picked up when the client re-opened the app after I changed it and put it back. The thing is that a Client could connect at any time and open the old application, loading it into memory on the server, and be working on it while you move the files around. One of the main reasons that we recommend that the Sesame Server is shut down during a Reconcile, Save As, File Transfer, in a multi-user environment is to be sure that no user can connect and open those files during that process.

But anyways those steps should work as long as the application is not currently open by the Sesame Server. If the load of the application after you put the files back in the correct directory is almost instant, with a large app, then the app was probably already loaded into memory on the Sesame Server.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged