Thank you very much for the explanation. Not sure where it was going wrong, I think it was the { } like in the pure TCL, but now works. Thank you for your assistance.
The final code: set petOwner [getFormValue petOwner] ;#nsget Form set petName [getFormValue petName] set dbToken [getFormValue dbToken] set dbRecord [getFormValue dbRecord] nsv_set db $dbToken,petOwner "$petOwner" nsv_set db $dbToken,petName "$petName" puts ":: [nsv_get db $dbRecord,petName]" Peace, Fox ----- Original Message ----- From: "Zoran Vasiljevic" <z...@archiware.com> To: "naviserver-devel" <naviserver-devel@lists.sourceforge.net> Sent: Thursday, March 12, 2020 10:55:01 PM Subject: Re: [naviserver-devel] Naviserver keep variables after connection closed? puts outputs the data into the servers log since stdout and stderr are redirested to logfile . It does not work as in Tcl shell where stdout is connected to your terminal. nsv_set db $id $owner is the right syntax The db is your name of the array, the $id is the key and $owner is the value. Am 12. März 2020 23:42:33 MEZ schrieb "D.Fox" <uns...@crystalforest.tf>: >Yes. I have been reviewing the manual, but it's still not working for >me. >It's still not holding persistence nor am I having any luck. Which is >why I am posting here. > >set dbRecord [getFormValue dbRecord] >nsv_set id $dbRecord >nsv_set db ($id,Owner) "$petOwner" >nsv_set db ($id,Name) "$petName" > >puts [array get db *,Owner] >#results: nothing! > >I've tried it with and without the curly braces. >Three lines of code I can't get working. > >Fox > >----- Original Message ----- >From: "Zoran Vasiljevic" <z...@archiware.com> >To: "D.Fox" <uns...@crystalforest.tf> >Cc: "naviserver-devel" <naviserver-devel@lists.sourceforge.net> >Sent: Thursday, March 12, 2020 10:00:52 PM >Subject: Re: [naviserver-devel] Naviserver keep variables after >connection closed? > >It is: nsv_set arrayname element ?value? >Please consult doc pages about nsv commands. > >Am 12. März 2020 22:48:03 MEZ schrieb "D.Fox" ><uns...@crystalforest.tf>: >>Thanks, I updated the server as I was getting core dumps. I am >assuming >>nsv_set and would I need to create the array blank first? >>Each ID is a new array holding information, incremented by the last >ID. >> >>I get this error otherwise: >>-code 1 -level 0 -errorstack {INNER {invokeStk1 nsv_set db(1,Owner) >>TestOwnder} CALL storageUpdate CALL {Storage insert}} -errorcode NONE >>-errorinfo {no such array: db(1,Owner) >> while executing >>"nsv_set db($id,Owner) "Owner"" >> (procedure "storageUpdate" line 13) >> invoked from within >>"storageUpdate "} -errorline 5 >> >>Thanks, >>Fox > > >_______________________________________________ >naviserver-devel mailing list >naviserver-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/naviserver-devel _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel