Unusual behaviour [Valentina with LIVECODE API, Bitset/Array Set conversions]

wtng wtng at pacific.net.sg
Fri Jun 22 01:54:29 CDT 2012


Ruslan/ Kirill,

Ruslan, yes I use the SQL way most of the time and work with the cursor.
However, I am testing to see if certain queries have better performance if I
use the API way.  That's why I am testing the BitSet/ArraySet functions.
BTW, Valentina is a very good database to use with LiveCode.:)

Kirill, the syntax in your reply works well!  In summary,

1.  Must clone the BitSet and use the clone to convert.
2.  Need to change the documentation in V4REV reference at pg 156 to read
VArraySet_FromBitSet(ArraySetRef, BitSetRef) where ArraySetRef is the
reference of the cloned Bitset and BitSetRef is the reference of the
original BitSet.  The cloned BitSet will then become an ArraySet.

Now I tried to do conversion from ArraySet to BitSet and the same syntax
(with the VBitSet_FromArraySet function) does NOT work.

Eg:

on mouseUp
        
   put VField_FindValueAsArraySet(fldCode, "E001") into tArySetRef  --
fldcode is a previously defined field ref
   put tArySetRef & return after field efDisplay  -- this works, displays
the 8 digit ref
   
   put VSet_Clone(tArySetRef) into tBitSetRef 
   get VBitSet_FromArraySet (tBitSetRef,tArySetRef)  -- this fails and
crashes livecode again with a c0000005 error
	-- I have also tried "put VBitSet_FromArraySet(50, tBitSetRef) into
tAnotherRef" like it is described in pg 159 but also crashes.
   put tBitSetRef & return after field efDisplay
   
end mouseUp

Is the syntax for ArraySet to BitSet conversion different?

Sincerely,
Ng Wee Tong
  

-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of
valentina-request at lists.macserve.net
Sent: Thursday, 21 June, 2012 11:14 PM
To: valentina at lists.macserve.net
Subject: Valentina Digest, Vol 114, Issue 11

Send Valentina mailing list submissions to
	valentina at lists.macserve.net

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.macserve.net/mailman/listinfo/valentina
or, via email, send a message with subject or body 'help' to
	valentina-request at lists.macserve.net

You can reach the person managing the list at
	valentina-owner at lists.macserve.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Valentina digest..."


Today's Topics:

   1. Re: Crash in 5.0 beta ram only mode (Ruslan Zasukhin)
   2. Re: Unusual behaviour [Valentina with LIVECODE API,
      Converting	BitSets to ArraySets] (Ruslan Zasukhin)
   3. Re: Unusual behaviour [Valentina with LIVECODE API,
      Converting BitSets	to ArraySets] (Kirill Pekarov)
   4. general question for creating database
      (Christian - ChrisKatDev.com)
   5. How to open older Valentina Database (william humphrey)
   6. Re: How to open older Valentina Database (Francois Van Lerberghe)
   7. Re: How to open older Valentina Database (william humphrey)
   8. Re: How to open older Valentina Database (Francois Van Lerberghe)
   9. Re: How to open older Valentina Database (william humphrey)


----------------------------------------------------------------------

Message: 1
Date: Thu, 21 Jun 2012 09:43:26 +0300
From: Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com>
To: "valentina at lists.macserve.net" <valentina at lists.macserve.net>
Subject: Re: Crash in 5.0 beta ram only mode
Message-ID: <CC089D3E.101DB9%ruslan_zasukhin at valentina-db.com>
Content-Type: text/plain;	charset="ISO-8859-1"

On 6/19/12 8:10 PM, "Chris Jones" <cjones at daz3d.com> wrote:

Hi Chris,

> I am attempting the 5.0 beta of the vsdk, when I'm working normally
(talking
> to a server) it seems to be working, but when I activate a ram only mode I
get
> a bad table pointer back. ?So I have a simple Boost test that looks like
the
> following:

To work with RAM only mode, you use normal VKERNEL.dll

Have you init Valentina engine?
 Valentina.Init( serials )

?    


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




------------------------------

Message: 2
Date: Thu, 21 Jun 2012 09:52:06 +0300
From: Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com>
To: "valentina at lists.macserve.net" <valentina at lists.macserve.net>
Subject: Re: Unusual behaviour [Valentina with LIVECODE API,
	Converting	BitSets to ArraySets]
Message-ID: <CC089F46.101DBD%ruslan_zasukhin at valentina-db.com>
Content-Type: text/plain;	charset="US-ASCII"

On 6/20/12 9:09 AM, "wtng" <wtng at pacific.net.sg> wrote:

> Friends,
>  
> Background:  I have a simple test table called pricelist with 4 columns
and
> only 12 records.
> In my card script, I have already set up my table reference to be the
global
> variable tblPricelist.
>  
> My problem arises as I am trying out the functions to change a bitset to
> arrayset.

Hi Wee,

First of all I want ask you, if you really see need to use hard API way in
your project?

May be SQL way will be much better for you ?


--------
About issue you describe, I will ask Kirill to check it.



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




------------------------------

Message: 3
Date: Thu, 21 Jun 2012 11:31:12 +0300
From: Kirill Pekarov <kirill_pekarov at valentina-db.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: Unusual behaviour [Valentina with LIVECODE API,
	Converting BitSets	to ArraySets]
Message-ID: <4FE2DBD0.4060206 at valentina-db.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi.

Please try such syntax:


function Test_V4REV_VArraySet_FromBitSet
    get TEST("Test_V4REV_VArraySet_FromBitSet")

    -- Prepare database
    get Test_V4REV_VTable_Prepare()

    put VTable_SelectAllRecords( mTbl1 ) into setAll
    put VSet_Count( setAll ) into res

    get DO_TEST_EQ( res, 3 )

    put VSet_Clone(setAll) into arraySet
    get VArraySet_FromBitSet( arraySet, setAll )
    put VSet_Count( arraySet ) into res2

    get DO_TEST_EQ( res2, 3 )

    -- Close database
    get CloseAndTrashTestDatabase()
end Test_V4REV_VArraySet_FromBitSet




------------------------------

Message: 4
Date: Thu, 21 Jun 2012 13:49:00 +0200
From: "Christian - ChrisKatDev.com" <christian at chriskatdev.com>
To: Valentina Developers <valentina at galileo.macserve.net>
Subject: general question for creating database
Message-ID: <236ECEB3-A00E-4599-B8BF-09E1A31C9455 at chriskatdev.com>
Content-Type: text/plain; charset=us-ascii

hello,

When you create by code (RB in fact), database + tables + fields, do you
call db.flush after doing the job ?

best regards
Christian

------------------------------

Message: 5
Date: Thu, 21 Jun 2012 08:40:56 -0400
From: william humphrey <bill at bluewatermaritime.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: How to open older Valentina Database
Message-ID:
	<CA+ZPFi8iQJfVf2OQDQ0O4ky9hvjqSLmvBaHumyaoJAp22Qxi9g at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I have a valentina database that was made for the "Mailbase" app.  I used
to open it with older versions of vStudio but the present version says it
is not "Valentina2" when I try to open it.

Since vStudio can open so many kinds of databases (SQLite etc) how do you
get vStudio to open older Valentina databases?

Or can anyone convert it for me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120621/7507ede5
/attachment-0001.html>

------------------------------

Message: 6
Date: Thu, 21 Jun 2012 16:15:59 +0200
From: Francois Van Lerberghe <fvanlerberghe at freegates.be>
To: Valentina Developers <valentina at galileo.macserve.net>
Subject: Re: How to open older Valentina Database
Message-ID: <CC08F93F.4B6A0%fvanlerberghe at freegates.be>
Content-Type: text/plain; charset="iso-8859-1"

Hello William,

Vstudio 4.3 is the last release allowing us to open a Valentina V1 database.
You can download it from the Valentina web server.

Fran?ois Van Lerberghe
Rue Thier Monty, 15 A
4570 Marchin
Belgique


le 21/06/12 14:40, william humphrey <bill at bluewatermaritime.com> a ?crit?:

> I have a valentina database that was made for the "Mailbase" app. ?I used
to
> open it with older versions of vStudio but the present version says it is
not
> "Valentina2" when I try to open it.
> 
> Since vStudio can open so many kinds of databases (SQLite etc) how do you
get
> vStudio to open older Valentina databases?
> 
> Or can anyone convert it for me?


-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120621/8fa75f79
/attachment-0001.html>

------------------------------

Message: 7
Date: Thu, 21 Jun 2012 10:32:59 -0400
From: william humphrey <bill at bluewatermaritime.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: How to open older Valentina Database
Message-ID:
	<CA+ZPFi9AOw2YZmsCJBGmr7aK5RfPkQk6CoRsKL7HKC9ocVg_6w at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Thanks. That's amazing that the new versions of vStudio won't open the
older versions of the database.

On Thu, Jun 21, 2012 at 10:15 AM, Francois Van Lerberghe <
fvanlerberghe at freegates.be> wrote:

>  Hello William,
>
> Vstudio 4.3 is the last release allowing us to open a Valentina V1
> database. You can download it from the Valentina web server.
>
> Fran?ois Van Lerberghe
> Rue Thier Monty, 15 A
> 4570 Marchin
> Belgique
>
>
> le 21/06/12 14:40, william humphrey <bill at bluewatermaritime.com> a ?crit :
>
> I have a valentina database that was made for the "Mailbase" app.  I used
> to open it with older versions of vStudio but the present version says it
> is not "Valentina2" when I try to open it.
>
> Since vStudio can open so many kinds of databases (SQLite etc) how do you
> get vStudio to open older Valentina databases?
>
> Or can anyone convert it for me?
>
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>


-- 
http://www.bluewatermaritime.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120621/62be4a15
/attachment-0001.html>

------------------------------

Message: 8
Date: Thu, 21 Jun 2012 17:08:06 +0200
From: Francois Van Lerberghe <fvanlerberghe at freegates.be>
To: Valentina Developers <valentina at galileo.macserve.net>
Subject: Re: How to open older Valentina Database
Message-ID: <CC090576.4B6A9%fvanlerberghe at freegates.be>
Content-Type: text/plain; charset="ISO-8859-1"

I agree with you. It's annoying me too.

Fran?ois Van Lerberghe
Rue Thier Monty, 15 A
4570 Marchin
Belgique


le 21/06/12 16:32, william humphrey <bill at bluewatermaritime.com> a ?crit?:

> That's amazing that the new versions of vStudio won't open the older
> versions of the database.




------------------------------

Message: 9
Date: Thu, 21 Jun 2012 11:14:19 -0400
From: william humphrey <bill at bluewatermaritime.com>
To: Valentina Developers <valentina at lists.macserve.net>
Subject: Re: How to open older Valentina Database
Message-ID:
	<CA+ZPFi_7=QOHYgF6rFGSrTUJMPOpOeOT6-fXfajdNb8y7EtXCA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Well I finally downloaded a copy of vStudio 4.3 It's
http://www.valentina-db.com/download/prev_releases/3.0/ which says 3.0 but
it doesn't matter as it still doesn't open the older version. I may have to
just find an older mac to run it and then dump the data all as SQL and suck
it up again in a newer version.

On Thu, Jun 21, 2012 at 11:08 AM, Francois Van Lerberghe <
fvanlerberghe at freegates.be> wrote:

> I agree with you. It's annoying me too.
>
> Fran?ois Van Lerberghe
> Rue Thier Monty, 15 A
> 4570 Marchin
> Belgique
>
>
> le 21/06/12 16:32, william humphrey <bill at bluewatermaritime.com> a ?crit :
>
> > That's amazing that the new versions of vStudio won't open the older
> > versions of the database.
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



-- 
http://www.bluewatermaritime.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.macserve.net/pipermail/valentina/attachments/20120621/8818731f
/attachment.html>

------------------------------

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina


End of Valentina Digest, Vol 114, Issue 11
******************************************



More information about the Valentina mailing list