interesting issue with 9.3 and anonymous ctypes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

interesting issue with 9.3 and anonymous ctypes

Tim Taplin
I’ve been dealing with some random crashes in 9.3 installations on code which works fine on 9.2.7 and had the time today to track down one specific issue. I’m not sure whether anyone else does this, but I have a custom type object that conatins some hard coded data structures and methods for retrieving specific elements on demand. I often have referenced it directly instead of creating an instance. So, I might call
        coupon_categories->findIDname(#id)

instead of creating a local instance and then calling the method.

In one case, where this is performed repeatedly on a set of database records, it was causing the lasso9.3 instance to crash with no error. I put in protect blocks with handles and nothing was logged. I managed to isolate the issue to the specific call to that custom type and recognized that this could be a suboptimal way of referencing the method. After assigning a local outside the loop so that it could be used on each record, the issue went away.

I have subsequently made that instance a property on the main object that manages this interaction so that it is defined each time the object is created and found 4 other similar loops where I was making similar calls.

I have used this code in lasso 9 since 2012 with no known side effects, but I can see that it may not be the “right” way to code. However, it may be something that indicates some deeper issue with the current lasso9 version which could help track down other bugs and crashes as reported by several colleagues recently.

Hope this helps someone else to save some time in troubleshooting issues.

Tim Taplin


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting issue with 9.3 and anonymous ctypes

Ke Carlton-3
Hello Tim,

I think this is a somewhat too abstracted to be very useful. Perhaps some
example code with the data structure that causes the crash would make it
more helpful?

I spent a day or two this week isolating a crash, I use
debug->acivate('console') for that type of issue normally — helps locate
the exact point of failure.

Thanks,

Ke



On Fri, Aug 7, 2015 at 3:41 AM Tim Taplin <[hidden email]>
wrote:

> I’ve been dealing with some random crashes in 9.3 installations on code
> which works fine on 9.2.7 and had the time today to track down one specific
> issue. I’m not sure whether anyone else does this, but I have a custom type
> object that conatins some hard coded data structures and methods for
> retrieving specific elements on demand. I often have referenced it directly
> instead of creating an instance. So, I might call
>         coupon_categories->findIDname(#id)
>
> instead of creating a local instance and then calling the method.
>
> In one case, where this is performed repeatedly on a set of database
> records, it was causing the lasso9.3 instance to crash with no error. I put
> in protect blocks with handles and nothing was logged. I managed to isolate
> the issue to the specific call to that custom type and recognized that this
> could be a suboptimal way of referencing the method. After assigning a
> local outside the loop so that it could be used on each record, the issue
> went away.
>
> I have subsequently made that instance a property on the main object that
> manages this interaction so that it is defined each time the object is
> created and found 4 other similar loops where I was making similar calls.
>
> I have used this code in lasso 9 since 2012 with no known side effects,
> but I can see that it may not be the “right” way to code. However, it may
> be something that indicates some deeper issue with the current lasso9
> version which could help track down other bugs and crashes as reported by
> several colleagues recently.
>
> Hope this helps someone else to save some time in troubleshooting issues.
>
> Tim Taplin
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Adding Record - Unknown Command Error

John Torres-3
In reply to this post by Tim Taplin
I am upgrading and testing Lasso 9.3 with FileMaker 14 Server. I'm updating all of my code. In trying to do a simple inline add record I can't seem to get around this FileMaker Server error:

"4 : Error from FileMaker server"

Error Code 4 = Unknown Command

Here is the code. What am I missing???

Inline(
-add,
-Database='DBNAME',
-Table='TBNAME',
-username='username',
-password='password',
'sessionID'=$Event,
'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
'chapterID'=$chapterID,
'school'=$school,
'address'=$address,
'city'=$city,
'state'=$state,
'zip'=$zip,
'fname'=$fname,
'lname'=$lname,
'schoolphone'=$schoolphone,
'homephone'=$homephone,
'cellphone'=$cellphone,
'webmail'=$webmail,
'ponum'=$ponum) => {^    

error_code + ' : ' + error_msg

^}



John Torres
Ohio FFA Association
[hidden email]



#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

stevepiercy
One more tip for debugging:

action_statement

That method will show the query string that Lasso sends to FileMaker.

See this message, too.
http://lasso.2283332.n4.nabble.com/FileMaker-Server-13-problems-with-Lasso-maybe-12-too-tt4643574.html#a4643586

The error code and message indicate that the query string was
not understood by FileMaker.  There must be a funky operator or
command.  I would suggest commenting out all the field
parameters, then uncommenting them one at a time and test until
you field the field that triggers the error.

--steve


On 8/12/15 at 9:34 PM, [hidden email] (John Torres) pronounced:

>I am upgrading and testing Lasso 9.3 with FileMaker 14 Server.
>I'm updating all of my code. In trying to do a simple inline
>add record I can't seem to get around this FileMaker Server error:
>
>"4 : Error from FileMaker server"
>
>Error Code 4 = Unknown Command
>
>Here is the code. What am I missing???
>
>Inline(
>-add,
>-Database='DBNAME',
>-Table='TBNAME',
>-username='username',
>-password='password',
>'sessionID'=$Event,
>'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
>'chapterID'=$chapterID,
>'school'=$school,
>'address'=$address,
>'city'=$city,
>'state'=$state,
>'zip'=$zip,
>'fname'=$fname,
>'lname'=$lname,
>'schoolphone'=$schoolphone,
>'homephone'=$homephone,
>'cellphone'=$cellphone,
>'webmail'=$webmail,
>'ponum'=$ponum) => {^
>error_code + ' : ' + error_msg
>^}
>
>
>
>John Torres
>Ohio FFA Association
>[hidden email]
>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.StevePiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

maxwellk2
In reply to this post by John Torres-3
Not actually tested against FM but I would guess your timestamp format for 'regdate' is invalid:

        08/13/2015 - 05:080 PM  <- your code (in Lasso 9.2.7)
        8/13/2015 5:03:53 PM <- FM formated Timestamp

An easy fix would be to have the 'regdate’ field in FM auto-enter "Creation Timestamp (Date and Time)" - assuming your Lasso server and FM server are in the same timezone and set to the same time. Then you could remove 'regdate’ from the inline entirely

Alternately you’d need to figure out whats causing the extra '0' in the time ’05:080', and also remove the dash between the date and time.

-Max



> On Aug 12, 2015, at 6:34 PM, John Torres <[hidden email]> wrote:
>
> I am upgrading and testing Lasso 9.3 with FileMaker 14 Server. I'm updating all of my code. In trying to do a simple inline add record I can't seem to get around this FileMaker Server error:
>
> "4 : Error from FileMaker server"
>
> Error Code 4 = Unknown Command
>
> Here is the code. What am I missing???
>
> Inline(
> -add,
> -Database='DBNAME',
> -Table='TBNAME',
> -username='username',
> -password='password',
> 'sessionID'=$Event,
> 'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
> 'chapterID'=$chapterID,
> 'school'=$school,
> 'address'=$address,
> 'city'=$city,
> 'state'=$state,
> 'zip'=$zip,
> 'fname'=$fname,
> 'lname'=$lname,
> 'schoolphone'=$schoolphone,
> 'homephone'=$homephone,
> 'cellphone'=$cellphone,
> 'webmail'=$webmail,
> 'ponum'=$ponum) => {^    
>
> error_code + ' : ' + error_msg
>
> ^}
>
>
>
> John Torres
> Ohio FFA Association
> [hidden email]
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

John Torres-3
Thanks for the suggestions Maxwell and Steve,

I've done both, and keep running into the same issue. I do however, keep experiencing great dificulty with Lasso's instance manager. I am thinking there may be issues there. I've see elsewhere that a fix has been uninstalling Lasso and reinstalling altogether. I may go that route.

Just for proof, here is what I am seeing from the action_statement return without even adding a single field parameter. I displayed the variables to see what they were producing.

CODE
Inline(
-add,
-Database='test',
-Table='camp',
-username='username',
-password='password'
// 'sessionID'=$Event,
// 'chapterID'=$chapterID,
// 'school'=$school,
// 'address'=$address,
// 'city'=$city,
// 'state'=$state,
// 'zip'=$zip,
// 'fname'=$fname,
// 'lname'=$lname,
// 'schoolphone'=$schoolphone,
// 'homephone'=$homephone,
// 'cellphone'=$cellphone,
// 'webmail'=$webmail,
//'ponum'=$ponum
)

=> {^    

' || ' + error_code + ' : ' + error_msg + ' || ' + action_statement

^}

RESULT
4 : Error from FileMaker server || -db=test&-lay=camp&-username=username&-password=password&-new

John Torres
Ohio FFA Association
[hidden email]







On Aug 13, 2015, at 8:11 PM, Maxwell Klein <[hidden email]> wrote:

> Not actually tested against FM but I would guess your timestamp format for 'regdate' is invalid:
>
> 08/13/2015 - 05:080 PM  <- your code (in Lasso 9.2.7)
> 8/13/2015 5:03:53 PM <- FM formated Timestamp
>
> An easy fix would be to have the 'regdate’ field in FM auto-enter "Creation Timestamp (Date and Time)" - assuming your Lasso server and FM server are in the same timezone and set to the same time. Then you could remove 'regdate’ from the inline entirely
>
> Alternately you’d need to figure out whats causing the extra '0' in the time ’05:080', and also remove the dash between the date and time.
>
> -Max
>
>
>
>> On Aug 12, 2015, at 6:34 PM, John Torres <[hidden email]> wrote:
>>
>> I am upgrading and testing Lasso 9.3 with FileMaker 14 Server. I'm updating all of my code. In trying to do a simple inline add record I can't seem to get around this FileMaker Server error:
>>
>> "4 : Error from FileMaker server"
>>
>> Error Code 4 = Unknown Command
>>
>> Here is the code. What am I missing???
>>
>> Inline(
>> -add,
>> -Database='DBNAME',
>> -Table='TBNAME',
>> -username='username',
>> -password='password',
>> 'sessionID'=$Event,
>> 'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
>> 'chapterID'=$chapterID,
>> 'school'=$school,
>> 'address'=$address,
>> 'city'=$city,
>> 'state'=$state,
>> 'zip'=$zip,
>> 'fname'=$fname,
>> 'lname'=$lname,
>> 'schoolphone'=$schoolphone,
>> 'homephone'=$homephone,
>> 'cellphone'=$cellphone,
>> 'webmail'=$webmail,
>> 'ponum'=$ponum) => {^    
>>
>> error_code + ' : ' + error_msg
>>
>> ^}
>>
>>
>>
>> John Torres
>> Ohio FFA Association
>> [hidden email]
>>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

stevepiercy
Oh, duh.  Sorry I didn't spot this sooner.

In Lasso 9, you have already entered a host/db/user/pass in
Lasso Admin for the instance.  This provides the necessary
information for Lasso to connect to FileMaker.  Thus you don't
need to use a -username and -password parameter in your inline.

So comment those two parameters, then uncomment the rest, and it
should add (subject to Max's date formatting comment).

--steve


On 8/13/15 at 11:20 PM, [hidden email] (John Torres) pronounced:

>Thanks for the suggestions Maxwell and Steve,
>
>I've done both, and keep running into the same issue. I do
>however, keep experiencing great dificulty with Lasso's
>instance manager. I am thinking there may be issues there. I've
>see elsewhere that a fix has been uninstalling Lasso and
>reinstalling altogether. I may go that route.
>
>Just for proof, here is what I am seeing from the
>action_statement return without even adding a single field
>parameter. I displayed the variables to see what they were producing.
>
>CODE              Inline(
>-add,
>-Database='test',
>-Table='camp',
>-username='username',
>-password='password'
>// 'sessionID'=$Event,
>// 'chapterID'=$chapterID,
>// 'school'=$school,
>// 'address'=$address,
>// 'city'=$city,
>// 'state'=$state,
>// 'zip'=$zip,
>// 'fname'=$fname,
>// 'lname'=$lname,
>// 'schoolphone'=$schoolphone,
>// 'homephone'=$homephone,
>// 'cellphone'=$cellphone,
>// 'webmail'=$webmail,
>//'ponum'=$ponum
>)
>=> {^
>' || ' + error_code + ' : ' + error_msg + ' || ' + action_statement
>
>^}
>
>RESULT                4 : Error from FileMaker server || -db=test&-lay=camp&-username=username&-password=password&-new
>
>John Torres
>Ohio FFA Association
>[hidden email]
>
>
>
>
>
>
>
>On Aug 13, 2015, at 8:11 PM, Maxwell Klein <[hidden email]> wrote:
>
>>Not actually tested against FM but I would guess your timestamp format for 'regdate' is
>invalid:
>>
>>08/13/2015 - 05:080 PM  <- your code (in Lasso 9.2.7)
>>8/13/2015 5:03:53 PM <- FM formated Timestamp
>>
>>An easy fix would be to have the 'regdate’ field in FM auto-enter "Creation Timestamp
>(Date and Time)" - assuming your Lasso server and FM server are
>in the same timezone and set to the same time. Then you could
>remove 'regdate’ from the inline entirely
>>
>>Alternately you’d need to figure out whats causing the extra '0' in the time ’05:080',
>and also remove the dash between the date and time.
>>
>>-Max
>>
>>
>>
>>> On Aug 12, 2015, at 6:34 PM, John Torres <[hidden email]> wrote:
>>>   I am upgrading and testing Lasso 9.3 with FileMaker 14
>>>Server. I'm updating all of my
>code. In trying to do a simple inline add record I can't seem
>to get around this FileMaker Server error:
>>>   "4 : Error from FileMaker server"
>>>   Error Code 4 = Unknown Command
>>>   Here is the code. What am I missing???
>>>   Inline(
>>> -add,
>>> -Database='DBNAME',
>>> -Table='TBNAME',
>>> -username='username',
>>> -password='password',
>>> 'sessionID'=$Event,
>>> 'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
>>> 'chapterID'=$chapterID,
>>> 'school'=$school,
>>> 'address'=$address,
>>> 'city'=$city,
>>> 'state'=$state,
>>> 'zip'=$zip,
>>> 'fname'=$fname,
>>> 'lname'=$lname,
>>> 'schoolphone'=$schoolphone,
>>> 'homephone'=$homephone,
>>> 'cellphone'=$cellphone,
>>> 'webmail'=$webmail,
>>>  'ponum'=$ponum) => {^      error_code + ' : ' + error_msg   ^}
>>>     John Torres
>>> Ohio FFA Association
>>> [hidden email]
>>>     #############################################################
>>>   This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>>#############################################################
>>
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso [hidden email]
>>Official list archives available at http://www.lassotalk.com
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.StevePiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

maxwellk2
Confirmed Steve’s suggestion should fix the issue. If you want to use username/password then you need to use the -host method...

inline( -add,
    -host=array(
        -datasource='filemakerds',
        -name='127.0.0.1',
        -port='80',
        -username='user',
        -password='password'),
    -database='database_name',
    -table='table_name' ) => {^
   
    found_count

^}

...as described at the end of this article...

        http://www.lassosoft.com/Connecting-Lasso-and-FileMaker


Just tested and confirmed the -host method works between Lasso 9.3 and FileMaker Server 13, but should also work with FileMaker Server 14.

-Max


> On Aug 13, 2015, at 9:31 PM, Steve Piercy - Website Builder <[hidden email]> wrote:
>
> Oh, duh.  Sorry I didn't spot this sooner.
>
> In Lasso 9, you have already entered a host/db/user/pass in Lasso Admin for the instance.  This provides the necessary information for Lasso to connect to FileMaker.  Thus you don't need to use a -username and -password parameter in your inline.
>
> So comment those two parameters, then uncomment the rest, and it should add (subject to Max's date formatting comment).
>
> --steve
>
>
> On 8/13/15 at 11:20 PM, [hidden email] (John Torres) pronounced:
>
>> Thanks for the suggestions Maxwell and Steve,
>>
>> I've done both, and keep running into the same issue. I do however, keep experiencing great dificulty with Lasso's instance manager. I am thinking there may be issues there. I've see elsewhere that a fix has been uninstalling Lasso and reinstalling altogether. I may go that route.
>>
>> Just for proof, here is what I am seeing from the action_statement return without even adding a single field parameter. I displayed the variables to see what they were producing.
>>
>> CODE              Inline(
>> -add,
>> -Database='test',
>> -Table='camp',
>> -username='username',
>> -password='password'
>> // 'sessionID'=$Event,
>> // 'chapterID'=$chapterID,
>> // 'school'=$school,
>> // 'address'=$address,
>> // 'city'=$city,
>> // 'state'=$state,
>> // 'zip'=$zip,
>> // 'fname'=$fname,
>> // 'lname'=$lname,
>> // 'schoolphone'=$schoolphone,
>> // 'homephone'=$homephone,
>> // 'cellphone'=$cellphone,
>> // 'webmail'=$webmail,
>> //'ponum'=$ponum
>> )
>> => {^
>> ' || ' + error_code + ' : ' + error_msg + ' || ' + action_statement
>>
>> ^}
>>
>> RESULT                4 : Error from FileMaker server || -db=test&-lay=camp&-username=username&-password=password&-new
>>
>> John Torres
>> Ohio FFA Association
>> [hidden email]
>>
>>
>>
>>
>>
>>
>>
>> On Aug 13, 2015, at 8:11 PM, Maxwell Klein <[hidden email]> wrote:
>>
>>> Not actually tested against FM but I would guess your timestamp format for 'regdate' is
>> invalid:
>>>
>>> 08/13/2015 - 05:080 PM  <- your code (in Lasso 9.2.7)
>>> 8/13/2015 5:03:53 PM <- FM formated Timestamp
>>>
>>> An easy fix would be to have the 'regdate’ field in FM auto-enter "Creation Timestamp
>> (Date and Time)" - assuming your Lasso server and FM server are in the same timezone and set to the same time. Then you could remove 'regdate’ from the inline entirely
>>>
>>> Alternately you’d need to figure out whats causing the extra '0' in the time ’05:080',
>> and also remove the dash between the date and time.
>>>
>>> -Max
>>>
>>>
>>>
>>>> On Aug 12, 2015, at 6:34 PM, John Torres <[hidden email]> wrote:
>>>>  I am upgrading and testing Lasso 9.3 with FileMaker 14 Server. I'm updating all of my
>> code. In trying to do a simple inline add record I can't seem to get around this FileMaker Server error:
>>>>  "4 : Error from FileMaker server"
>>>>  Error Code 4 = Unknown Command
>>>>  Here is the code. What am I missing???
>>>>  Inline(
>>>> -add,
>>>> -Database='DBNAME',
>>>> -Table='TBNAME',
>>>> -username='username',
>>>> -password='password',
>>>> 'sessionID'=$Event,
>>>> 'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
>>>> 'chapterID'=$chapterID,
>>>> 'school'=$school,
>>>> 'address'=$address,
>>>> 'city'=$city,
>>>> 'state'=$state,
>>>> 'zip'=$zip,
>>>> 'fname'=$fname,
>>>> 'lname'=$lname,
>>>> 'schoolphone'=$schoolphone,
>>>> 'homephone'=$homephone,
>>>> 'cellphone'=$cellphone,
>>>> 'webmail'=$webmail,
>>>> 'ponum'=$ponum) => {^      error_code + ' : ' + error_msg   ^}
>>>>    John Torres
>>>> Ohio FFA Association
>>>> [hidden email]
>>>>    #############################################################
>>>>  This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy              Website Builder              Soquel, CA
> <[hidden email]>               <http://www.StevePiercy.com/>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

John Torres-3
In reply to this post by John Torres-3
Thanks all. I'll give that a try. I did try running the inline without the username and password, but kept getting a FMS error 9 - Insufficient privileges to modify/access data. That confused me too since I thought that was the purpose of supplying a corresponding username and password to the FMS connection in Lasso's instance manager.

If adding the host doesn't work then I'm going to try to uninstall Lasso and reinstall a fresh copy. I'm running into some interesting glitches with the instance manager as well that don't seem to get resolved with restarting the server.

And just now realizing my confusion on date format syntax as I didn't realize that I was looking at the new ICU Date Format that Lasso 9 now supports vs. the classic format. I was trying to mix the two formats mistakenly.

Growing pains in upgrading to 9. I'll get there. Thanks for all of your help everyone. I'll update with progress.

John Torres
Ohio FFA Association
[hidden email]
Sent from iCloud


On Aug 14, 2015, at 01:17 PM, Maxwell Klein <[hidden email]> wrote:

> Confirmed Steve’s suggestion should fix the issue. If you want to use username/password then you need to use the -host method...
>
> inline( -add,
> -host=array(
> -datasource='filemakerds',
> -name='127.0.0.1',
> -port='80',
> -username='user',
> -password='password'),
> -database='database_name',
> -table='table_name' ) => {^
>
> found_count
>
> ^}
>
> ...as described at the end of this article...
>
>      http://www.lassosoft.com/Connecting-Lasso-and-FileMaker
>
>
> Just tested and confirmed the -host method works between Lasso 9.3 and FileMaker Server 13, but should also work with FileMaker Server 14.
>
> -Max
>
>
>> On Aug 13, 2015, at 9:31 PM, Steve Piercy - Website Builder <[hidden email]> wrote:
>>
>> Oh, duh. Sorry I didn't spot this sooner.
>>
>> In Lasso 9, you have already entered a host/db/user/pass in Lasso Admin for the instance. This provides the necessary information for Lasso to connect to FileMaker. Thus you don't need to use a -username and -password parameter in your inline.
>>
>> So comment those two parameters, then uncomment the rest, and it should add (subject to Max's date formatting comment).
>>
>> --steve
>>
>>
>> On 8/13/15 at 11:20 PM, [hidden email] (John Torres) pronounced:
>>
>>> Thanks for the suggestions Maxwell and Steve,
>>>
>>> I've done both, and keep running into the same issue. I do however, keep experiencing great dificulty with Lasso's instance manager. I am thinking there may be issues there. I've see elsewhere that a fix has been uninstalling Lasso and reinstalling altogether. I may go that route.
>>>
>>> Just for proof, here is what I am seeing from the action_statement return without even adding a single field parameter. I displayed the variables to see what they were producing.
>>>
>>> CODE Inline(
>>> -add,
>>> -Database='test',
>>> -Table='camp',
>>> -username='username',
>>> -password='password'
>>> // 'sessionID'=$Event,
>>> // 'chapterID'=$chapterID,
>>> // 'school'=$school,
>>> // 'address'=$address,
>>> // 'city'=$city,
>>> // 'state'=$state,
>>> // 'zip'=$zip,
>>> // 'fname'=$fname,
>>> // 'lname'=$lname,
>>> // 'schoolphone'=$schoolphone,
>>> // 'homephone'=$homephone,
>>> // 'cellphone'=$cellphone,
>>> // 'webmail'=$webmail,
>>> //'ponum'=$ponum
>>> )
>>> => {^
>>> ' || ' + error_code + ' : ' + error_msg + ' || ' + action_statement
>>>
>>> ^}
>>>
>>> RESULT 4 : Error from FileMaker server || -db=test&-lay=camp&-username=username&-password=password&-new
>>>
>>> John Torres
>>> Ohio FFA Association
>>> [hidden email]
>>>  
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Aug 13, 2015, at 8:11 PM, Maxwell Klein <[hidden email]> wrote:
>>>
>>>> Not actually tested against FM but I would guess your timestamp format for 'regdate' is
>>> invalid:
>>>>
>>>> 08/13/2015 - 05:080 PM <- your code (in Lasso 9.2.7)
>>>> 8/13/2015 5:03:53 PM <- FM formated Timestamp
>>>>
>>>> An easy fix would be to have the 'regdate’ field in FM auto-enter "Creation Timestamp
>>> (Date and Time)" - assuming your Lasso server and FM server are in the same timezone and set to the same time. Then you could remove 'regdate’ from the inline entirely
>>>>
>>>> Alternately you’d need to figure out whats causing the extra '0' in the time ’05:080',
>>> and also remove the dash between the date and time.
>>>>
>>>> -Max
>>>>
>>>>
>>>>
>>>>> On Aug 12, 2015, at 6:34 PM, John Torres <[hidden email]> wrote:
>>>>> I am upgrading and testing Lasso 9.3 with FileMaker 14 Server. I'm updating all of my
>>> code. In trying to do a simple inline add record I can't seem to get around this FileMaker Server error:
>>>>> "4 : Error from FileMaker server"
>>>>> Error Code 4 = Unknown Command
>>>>> Here is the code. What am I missing???
>>>>> Inline(
>>>>> -add,
>>>>> -Database='DBNAME',
>>>>> -Table='TBNAME',
>>>>> -username='username',
>>>>> -password='password',
>>>>> 'sessionID'=$Event,
>>>>> 'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
>>>>> 'chapterID'=$chapterID,
>>>>> 'school'=$school,
>>>>> 'address'=$address,
>>>>> 'city'=$city,
>>>>> 'state'=$state,
>>>>> 'zip'=$zip,
>>>>> 'fname'=$fname,
>>>>> 'lname'=$lname,
>>>>> 'schoolphone'=$schoolphone,
>>>>> 'homephone'=$homephone,
>>>>> 'cellphone'=$cellphone,
>>>>> 'webmail'=$webmail,
>>>>> 'ponum'=$ponum) => {^ error_code + ' : ' + error_msg ^}
>>>>> John Torres
>>>>> Ohio FFA Association
>>>>> [hidden email]
>>>>>  
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>>  
>>>>> Official list archives available at http://www.lassotalk.com
>>>>>  
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>>  
>>>> Official list archives available at http://www.lassotalk.com
>>>>  
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>>  
>>> Official list archives available at http://www.lassotalk.com
>>>  
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to <[hidden email]>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy Website Builder Soquel, CA
>> <[hidden email]> <http://www.StevePiercy.com/>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>>  
>> Official list archives available at http://www.lassotalk.com
>>  
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Record - Unknown Command Error

John Torres-3
In reply to this post by maxwellk2
OK,

I have tested based on your suggestions. Using the -host=array etc. works perfectly fine. No issues at all.

I went back through my original code and retooled testing with the -host parameters and then again without getting rid of the -username and -password again trying to let Lasso figure out how to log in based on the information in the instance manager data source settings. Bottom line, I got it to work both ways. I don't know how, but it works. When I kept trying it without the -username and -password I kept getting an Insufficient privileges error.

Thanks for your help Maxwell and Steve! Back on the road to converting code to Lasso 9 successfully.

I'm going to go drink a beer now to celebrate.

John Torres
Ohio FFA Association
[hidden email]






On Aug 14, 2015, at 1:17 PM, Maxwell Klein <[hidden email]> wrote:

> Confirmed Steve’s suggestion should fix the issue. If you want to use username/password then you need to use the -host method...
>
> inline( -add,
>    -host=array(
>        -datasource='filemakerds',
>        -name='127.0.0.1',
>        -port='80',
>        -username='user',
>        -password='password'),
>    -database='database_name',
>    -table='table_name' ) => {^
>
>    found_count
>
> ^}
>
> ...as described at the end of this article...
>
> http://www.lassosoft.com/Connecting-Lasso-and-FileMaker
>
>
> Just tested and confirmed the -host method works between Lasso 9.3 and FileMaker Server 13, but should also work with FileMaker Server 14.
>
> -Max
>
>
>> On Aug 13, 2015, at 9:31 PM, Steve Piercy - Website Builder <[hidden email]> wrote:
>>
>> Oh, duh.  Sorry I didn't spot this sooner.
>>
>> In Lasso 9, you have already entered a host/db/user/pass in Lasso Admin for the instance.  This provides the necessary information for Lasso to connect to FileMaker.  Thus you don't need to use a -username and -password parameter in your inline.
>>
>> So comment those two parameters, then uncomment the rest, and it should add (subject to Max's date formatting comment).
>>
>> --steve
>>
>>
>> On 8/13/15 at 11:20 PM, [hidden email] (John Torres) pronounced:
>>
>>> Thanks for the suggestions Maxwell and Steve,
>>>
>>> I've done both, and keep running into the same issue. I do however, keep experiencing great dificulty with Lasso's instance manager. I am thinking there may be issues there. I've see elsewhere that a fix has been uninstalling Lasso and reinstalling altogether. I may go that route.
>>>
>>> Just for proof, here is what I am seeing from the action_statement return without even adding a single field parameter. I displayed the variables to see what they were producing.
>>>
>>> CODE              Inline(
>>> -add,
>>> -Database='test',
>>> -Table='camp',
>>> -username='username',
>>> -password='password'
>>> // 'sessionID'=$Event,
>>> // 'chapterID'=$chapterID,
>>> // 'school'=$school,
>>> // 'address'=$address,
>>> // 'city'=$city,
>>> // 'state'=$state,
>>> // 'zip'=$zip,
>>> // 'fname'=$fname,
>>> // 'lname'=$lname,
>>> // 'schoolphone'=$schoolphone,
>>> // 'homephone'=$homephone,
>>> // 'cellphone'=$cellphone,
>>> // 'webmail'=$webmail,
>>> //'ponum'=$ponum
>>> )
>>> => {^
>>> ' || ' + error_code + ' : ' + error_msg + ' || ' + action_statement
>>>
>>> ^}
>>>
>>> RESULT                4 : Error from FileMaker server || -db=test&-lay=camp&-username=username&-password=password&-new
>>>
>>> John Torres
>>> Ohio FFA Association
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Aug 13, 2015, at 8:11 PM, Maxwell Klein <[hidden email]> wrote:
>>>
>>>> Not actually tested against FM but I would guess your timestamp format for 'regdate' is
>>> invalid:
>>>>
>>>> 08/13/2015 - 05:080 PM  <- your code (in Lasso 9.2.7)
>>>> 8/13/2015 5:03:53 PM <- FM formated Timestamp
>>>>
>>>> An easy fix would be to have the 'regdate’ field in FM auto-enter "Creation Timestamp
>>> (Date and Time)" - assuming your Lasso server and FM server are in the same timezone and set to the same time. Then you could remove 'regdate’ from the inline entirely
>>>>
>>>> Alternately you’d need to figure out whats causing the extra '0' in the time ’05:080',
>>> and also remove the dash between the date and time.
>>>>
>>>> -Max
>>>>
>>>>
>>>>
>>>>> On Aug 12, 2015, at 6:34 PM, John Torres <[hidden email]> wrote:
>>>>> I am upgrading and testing Lasso 9.3 with FileMaker 14 Server. I'm updating all of my
>>> code. In trying to do a simple inline add record I can't seem to get around this FileMaker Server error:
>>>>> "4 : Error from FileMaker server"
>>>>> Error Code 4 = Unknown Command
>>>>> Here is the code. What am I missing???
>>>>> Inline(
>>>>> -add,
>>>>> -Database='DBNAME',
>>>>> -Table='TBNAME',
>>>>> -username='username',
>>>>> -password='password',
>>>>> 'sessionID'=$Event,
>>>>> 'regdate'= date(server_date)->format('%m/%d/%Y - %h:%mm %p'),
>>>>> 'chapterID'=$chapterID,
>>>>> 'school'=$school,
>>>>> 'address'=$address,
>>>>> 'city'=$city,
>>>>> 'state'=$state,
>>>>> 'zip'=$zip,
>>>>> 'fname'=$fname,
>>>>> 'lname'=$lname,
>>>>> 'schoolphone'=$schoolphone,
>>>>> 'homephone'=$homephone,
>>>>> 'cellphone'=$cellphone,
>>>>> 'webmail'=$webmail,
>>>>> 'ponum'=$ponum) => {^      error_code + ' : ' + error_msg   ^}
>>>>>   John Torres
>>>>> Ohio FFA Association
>>>>> [hidden email]
>>>>>   #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy              Website Builder              Soquel, CA
>> <[hidden email]>               <http://www.StevePiercy.com/>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>