RECEIVE PACKET Issue with v11.4

View: New views
7 Messages — Rating Filter:   Alert me  

RECEIVE PACKET Issue with v11.4

by Narinder Chandi-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all. OK, this is drving me bananas - the following code snippet works
fine in 2004.7 running on Mac OS X 10.5.8 but it returns an End of File
error (eof) with v11.4. I'm reading a bog-standard sample text file encoded
in Mac OS Roman with CRs as the EOL delimiter:

C_TEXT($cr)
C_TEXT($data)
C_TIME($docRef)

$cr:=Char(Carriage return )
$docRef:=Open document("")

If (OK=1)

    Repeat
        RECEIVE PACKET($docRef;$data;$cr)
    Until (OK=0)
   
    CLOSE DOCUMENT($docRef)
End if

Well, it seems to me to be a bug in v11? Trying to read in a number of
characters instead, e.g. RECEIVE PACKET($docRef;$data;30000) resulted in the
same error. I'm not in Unicode mode. Am I missing something?

I think I can re-write it using Document to BLOB and parsing the BLOB that
but it's not something I'm familiar so I'd rarther than have to go down that
road (unless someone can offer a snippet of code!).

Regards,

Narinder.
--

 ______________________________________________________
| Narinder Chandi, Director,
| ToolBox Systems Limited, Surrey, England, UK.
| tel : +44 (0)1372 720117, mob : +44 (0)7973 512495
| www      : http://www.toolbox.uk.com
| Skype    : NarinderChandi
| LinkedIn : http://www.linkedin.com/in/toolboxsystems
| Twitter  : @ToolBoxSystems
|______________________________________________________
|         Consultancy * Development * Support
|______________________________________________________



**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************

Re: RECEIVE PACKET Issue with v11.4

by Koen Van Hooreweghe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Narinder,

I just created a brand new db with 11.4 (no hf) and added 1 method  
with your code.
Opened a small MacOS Roman encoded file with CR line endings. All  
goes fine. This is 4on 10.6.1

Are you running in unicode mode?

HTH
Koen

Op 3-nov-09, om 16:06 heeft Narinder Chandi het volgende geschreven:

> Hi all. OK, this is drving me bananas - the following code snippet  
> works
> fine in 2004.7 running on Mac OS X 10.5.8 but it returns an End of  
> File
> error (eof) with v11.4. I'm reading a bog-standard sample text file  
> encoded
> in Mac OS Roman with CRs as the EOL delimiter:

--------------------
Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
bvbaCompass@...


**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************

Re: RECEIVE PACKET Issue with v11.4

by Narinder Chandi-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Koen,

Hi. No, I am not running in Unicode mode. Anyway, I re-started 4D and hey
presto it works :-P Thanks for testing the code though - I thought I was
going mad! I've written a BLOB based version now and I think I'll roll with
that.

Regards,

Narinder.
--


on 03/11/2009 16:56, Koen Van Hooreweghe at bvbaCompass@... wrote:

> Narinder,
>
> I just created a brand new db with 11.4 (no hf) and added 1 method
> with your code.
> Opened a small MacOS Roman encoded file with CR line endings. All
> goes fine. This is 4on 10.6.1
>
> Are you running in unicode mode?
>
> HTH
> Koen
>
> Op 3-nov-09, om 16:06 heeft Narinder Chandi het volgende geschreven:
>
>> Hi all. OK, this is drving me bananas - the following code snippet
>> works
>> fine in 2004.7 running on Mac OS X 10.5.8 but it returns an End of
>> File
>> error (eof) with v11.4. I'm reading a bog-standard sample text file
>> encoded
>> in Mac OS Roman with CRs as the EOL delimiter:
>


**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************

sql question

by Salow, John :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have a Boolean field in 4d, should the where clause in sql look like...

Where booleanfield = 0

Or

Where booleanfield = false

Or

Where booleanfield = 'false'

Or something else...

thx
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************

Re: sql question

by Tim Penner (4D, Inc) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi John,

Salow, John wrote:

> If you have a Boolean field in 4d, should the where clause in sql look like...
>
> Where booleanfield = 0
>
> Or
>
> Where booleanfield = false
>
> Or
>
> Where booleanfield = 'false'
>
> Or something else...
>
> thx
>  

There are multiple ways of doing this; please see the following Tech
Tip: http://kb.4d.com/search/assetid=75824

Kind Regards,

Tim Penner
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************

Re: sql question

by Atanas Atanassov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi John,

Please, look at this TT for more information regarding boolean fields

http://kb.4d.com/search/assetid=75824



On Nov 3, 2009, at 11:16 AM, Salow, John wrote:

> If you have a Boolean field in 4d, should the where clause in sql  
> look like...
>
> Where booleanfield = 0
>
> Or
>
> Where booleanfield = false
>
> Or
>
> Where booleanfield = 'false'
>
> Or something else...
>

Atanas Atanassov
Technical Support Team Member
4D, Inc.

------------------------------------------------------------------------
----
Upgrade to 4D v11 SQL before 4D 2004
license and upgrade prices increase - http://www.4d.com
------------------------------------------------------------------------
----
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************

RE: sql question

by Salow, John :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thx! Never would have figured that one out on my own...

-----Original Message-----
From: 4d_tech-bounces@... [mailto:4d_tech-bounces@...] On Behalf Of Tim Penner
Sent: Tuesday, November 03, 2009 11:27 AM
To: 4D iNug Technical
Subject: Re: sql question

Hi John,

Salow, John wrote:

> If you have a Boolean field in 4d, should the where clause in sql look like...
>
> Where booleanfield = 0
>
> Or
>
> Where booleanfield = false
>
> Or
>
> Where booleanfield = 'false'
>
> Or something else...
>
> thx
>  

There are multiple ways of doing this; please see the following Tech
Tip: http://kb.4d.com/search/assetid=75824

Kind Regards,

Tim Penner
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.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-Unsubscribe@...
**********************************************************************