Re: Execute on Server Method Attribute
> Le 15 juil. 2018 à 04:47, Ben Kershaw via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > Is one of those arrays a pointer array? I’m guessing so, because that doesn’t > work and results in that error message. A pointer to other array types works > fine, but not a pointer array. Sorry. > > It should work, since you can send pointers to an EoS method, but… it > doesn’t. 4D could probably make it work, but they haven’t. I've encountered that too, 1st level pointer is ok, 2nd is not. -- Arnaud de Montard ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Execute on Server Method Attribute
Just one thought. Had the calling method process or method ended. If so pointers can not be used Regards Chuck On Sat, Jul 14, 2018 at 10:47 PM Ben Kershaw via 4D_Tech < 4d_tech@lists.4d.com> wrote: > On Jul 14, 2018, at 11:12 AM, Stephen J. Orth wrote: > > > > I'm struggling with designating a method to run on the server. The > method > > has 9 parameters which are passed to it: > > > > 1. Text Variable > > 2. Date Variable > > 3. Time (Long) Variable > > 4. Date Variable > > 5. Time (Long) Variable > > 6. Pointer To Array > > 7. Pointer To Array > > 8. Pointer To Array > > 9. Pointer To Array > > > > When the method is called and executed on the Server, I'm getting an > error: > > > > Accessing a parameter that does not exist > > Is one of those arrays a pointer array? I’m guessing so, because that > doesn’t work and results in that error message. A pointer to other array > types works fine, but not a pointer array. Sorry. > > It should work, since you can send pointers to an EoS method, but… it > doesn’t. 4D could probably make it work, but they haven’t. > > Regards, > Ben Kershaw > ** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** -- - Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064 Informed Solutions, Inc. Brookline, MA 02446 USA Registered 4D Developer Providers of 4D, Sybase & SQL Server connectivity http://www.informed-solutions.com - This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Execute on Server Method Attribute
On Jul 14, 2018, at 11:12 AM, Stephen J. Orth wrote: > > I'm struggling with designating a method to run on the server. The method > has 9 parameters which are passed to it: > > 1. Text Variable > 2. Date Variable > 3. Time (Long) Variable > 4. Date Variable > 5. Time (Long) Variable > 6. Pointer To Array > 7. Pointer To Array > 8. Pointer To Array > 9. Pointer To Array > > When the method is called and executed on the Server, I'm getting an error: > > Accessing a parameter that does not exist Is one of those arrays a pointer array? I’m guessing so, because that doesn’t work and results in that error message. A pointer to other array types works fine, but not a pointer array. Sorry. It should work, since you can send pointers to an EoS method, but… it doesn’t. 4D could probably make it work, but they haven’t. Regards, Ben Kershaw ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Execute on Server Method Attribute
Steve, I think you're using v15 at least - so, put all those parameters into an object and pass the object as the parameter. This resolves the 'Accessing a missing parameter' error. You can put the arrays directly into the object instead of using pointers. This way the server side method can create the arrays it requires and then simply place them back into the return object. "Return object" you say? OK, in this case you need to pass a single pointer to the parameter object. The server side method does whatever it needs to do. This should not rely on anything beyond the direction of what to do from the object ($1). At the end of the method execution you put the results into an object and them write that object back to the pointer to $1. Here's some psuedo code to illustrate: Eg: MySeverSideMethod(->$obj) // $obj has the dates, text and time variables // MyServerSideMethod c_object($obj) c_pointer($1) $obj:=$1-> // $obj now contains whatever you put in it on the client ARRAY X($aFirstArray;0) ... // do some stuff OBJECT SET ARRAY($obj:"firstArray";$aFirstArray) OBJECT SET ARRAY($obj:"secondArray";$aSecondArray) OBJECT SET ARRAY($obj:"thirdArray";$aThirdArray) ... $1->:=$obj // write $obj back to the pointed to variable The key points are that you can declare the arrays locally in the method so it runs no matter what. Then you simply write those arrays to the object passed in. Alternatively you could have your EOS method return an object with the desired data. I would go with writing the data to the passed object and returning either a boolean (true=it worked) or an error text ($0="This is the error message."). On Sat, Jul 14, 2018 at 7:12 AM Stephen J. Orth via 4D_Tech < 4d_tech@lists.4d.com> wrote: > I'm struggling with designating a method to run on the server. The method > has 9 parameters which are passed to it: > > 1. Text Variable > 2. Date Variable > 3. Time (Long) Variable > 4. Date Variable > 5. Time (Long) Variable > 6. Pointer To Array > 7. Pointer To Array > 8. Pointer To Array > 9. Pointer To Array > -- Kirk Brooks San Francisco, CA === *We go vote - they go home* ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Execute on Server Method Attribute
Does the database compile with compiler option “All variables are typed”? Have you tried assertions to test each parameter has the expected value type (test, date, time, pointer, pointed array type)? The failed assertion will be displayed on the server. > On Jul 14, 2018, at 10:12 AM, Stephen J. Orth via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I'm struggling with designating a method to run on the server. The method > has 9 parameters which are passed to it: > > 1. Text Variable > 2. Date Variable > 3. Time (Long) Variable > 4. Date Variable > 5. Time (Long) Variable > 6. Pointer To Array > 7. Pointer To Array > 8. Pointer To Array > 9. Pointer To Array > > When the method is called and executed on the Server, I'm getting an error: > > Accessing a parameter that does not exist > > If I turn off the EOS attribute, the method runs fine, so what am I missing > here and why can't the server access the parameters I'm passing? > > BTW, this is V16.3 running compiled... ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: Execute on Server Method Attribute
Doug, Thanks, that is the approach I'm taking now... We will see. Steve -Original Message- From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Douglas von Roeder via 4D_Tech Sent: Saturday, July 14, 2018 3:26 PM To: 4D iNug Technical <4d_tech@lists.4d.com> Cc: Douglas von Roeder Subject: Re: Execute on Server Method Attribute Steve: Try "bottom up" construction of the method. Create a method and get it to work with the most simple function. Then, incrementally add the code from the existing method. Don't copy and paste from the existing method — retype the code (that's based on a concern about "gremlins in the method"). -- Douglas von Roeder 949-336-2902 ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Execute on Server Method Attribute
Steve: Try "bottom up" construction of the method. Create a method and get it to work with the most simple function. Then, incrementally add the code from the existing method. Don't copy and paste from the existing method — retype the code (that's based on a concern about "gremlins in the method"). -- Douglas von Roeder 949-336-2902 On Sat, Jul 14, 2018 at 12:11 PM Stephen J. Orth via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Tim, > > Hey, hope all is going well with you! > > I've done all this and having no luck. I've written many methods that use > the EOS attribute, this is the first time I've run into any issue. > > > Steve > > > -Original Message- > From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Tim > Nevels via 4D_Tech > Sent: Saturday, July 14, 2018 2:08 PM > To: 4d_tech@lists.4d.com > Cc: Tim Nevels > Subject: Re: Execute on Server Method Attribute > > I would start simple. First be sure to declare the parameters with > compiler directives. > > Then modify the method to only use a single text parameter. Change the > parameter declarations too. Just for testing purposes. Test it. If it does > not generate an error with 1 parameter, add a second parameter and test > again. > > Tim > > Sent from my iPad > > On Jul 14, 2018, at 2:00 PM, Stephen J. Orth wrote: > > > I'm completely confused... > > > > No matter how I send the parameters (pointer, variable, text string) into > > this method with the EOS attribute enabled, Server is complaining that > I'm > > accessing a parameter that does not exist. > > > > I've looked at the documentation and my method follows exactly what is > > outlined, so why is Server having an issue running this method? > > > > Any input is GREATLY appreciated!!! > > ** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: Execute on Server Method Attribute
Tim, Hey, hope all is going well with you! I've done all this and having no luck. I've written many methods that use the EOS attribute, this is the first time I've run into any issue. Steve -Original Message- From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Tim Nevels via 4D_Tech Sent: Saturday, July 14, 2018 2:08 PM To: 4d_tech@lists.4d.com Cc: Tim Nevels Subject: Re: Execute on Server Method Attribute I would start simple. First be sure to declare the parameters with compiler directives. Then modify the method to only use a single text parameter. Change the parameter declarations too. Just for testing purposes. Test it. If it does not generate an error with 1 parameter, add a second parameter and test again. Tim Sent from my iPad On Jul 14, 2018, at 2:00 PM, Stephen J. Orth wrote: > I'm completely confused... > > No matter how I send the parameters (pointer, variable, text string) into > this method with the EOS attribute enabled, Server is complaining that I'm > accessing a parameter that does not exist. > > I've looked at the documentation and my method follows exactly what is > outlined, so why is Server having an issue running this method? > > Any input is GREATLY appreciated!!! ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Execute on Server Method Attribute
I would start simple. First be sure to declare the parameters with compiler directives. Then modify the method to only use a single text parameter. Change the parameter declarations too. Just for testing purposes. Test it. If it does not generate an error with 1 parameter, add a second parameter and test again. Tim Sent from my iPad On Jul 14, 2018, at 2:00 PM, Stephen J. Orth wrote: > I'm completely confused... > > No matter how I send the parameters (pointer, variable, text string) into > this method with the EOS attribute enabled, Server is complaining that I'm > accessing a parameter that does not exist. > > I've looked at the documentation and my method follows exactly what is > outlined, so why is Server having an issue running this method? > > Any input is GREATLY appreciated!!! ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: Execute on Server Method Attribute
I'm completely confused... No matter how I send the parameters (pointer, variable, text string) into this method with the EOS attribute enabled, Server is complaining that I'm accessing a parameter that does not exist. I've looked at the documentation and my method follows exactly what is outlined, so why is Server having an issue running this method? Any input is GREATLY appreciated!!! Steve -Original Message- From: Stephen J. Orth [mailto:s.o...@the-aquila-group.com] Sent: Saturday, July 14, 2018 9:13 AM To: 4D iNug Technical (4d_tech@lists.4D.com) <4d_tech@lists.4D.com> Subject: Execute on Server Method Attribute I'm struggling with designating a method to run on the server. The method has 9 parameters which are passed to it: 1. Text Variable 2. Date Variable 3. Time (Long) Variable 4. Date Variable 5. Time (Long) Variable 6. Pointer To Array 7. Pointer To Array 8. Pointer To Array 9. Pointer To Array When the method is called and executed on the Server, I'm getting an error: Accessing a parameter that does not exist If I turn off the EOS attribute, the method runs fine, so what am I missing here and why can't the server access the parameters I'm passing? BTW, this is V16.3 running compiled... Thanks in advance! Best, Steve ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Execute on Server Method Attribute
I'm struggling with designating a method to run on the server. The method has 9 parameters which are passed to it: 1. Text Variable 2. Date Variable 3. Time (Long) Variable 4. Date Variable 5. Time (Long) Variable 6. Pointer To Array 7. Pointer To Array 8. Pointer To Array 9. Pointer To Array When the method is called and executed on the Server, I'm getting an error: Accessing a parameter that does not exist If I turn off the EOS attribute, the method runs fine, so what am I missing here and why can't the server access the parameters I'm passing? BTW, this is V16.3 running compiled... Thanks in advance! Best, Steve * Stephen J. Orth The Aquila Group, Inc. Office: (608) 834-9213 P.O. Box 690 Mobile: (608) 347-6447 Sun Prairie, WI 53590 E-Mail: s.o...@the-aquila-group.com * ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **