From fb at memedia.de Thu Dec 1 10:58:49 2005 From: fb at memedia.de (Florian Bogeschdorfer) Date: Thu Dec 1 03:59:16 2005 Subject: SQL question SOLVED In-Reply-To: Message-ID: <0MKwtQ-1EhlDG2sMn-0001Y0@mrelayeu.kundenserver.de> Thank you all for your tips. All working now. Best regards Florian From sunshine at public.kherson.ua Thu Dec 1 14:26:54 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 1 06:27:17 2005 Subject: SQL question SOLVED In-Reply-To: <0MKwtQ-1EhlDG2sMn-0001Y0@mrelayeu.kundenserver.de> Message-ID: On 12/1/05 11:58 AM, "Florian Bogeschdorfer" wrote: > Thank you all for your tips. All working now. And which way you have choose? :-) -- 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] From sunshine at public.kherson.ua Fri Dec 2 09:33:39 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 2 01:34:09 2005 Subject: Creating new fields in classes way Re: Telling tables what their fields are In-Reply-To: Message-ID: On 11/28/05 9:35 AM, "Ed Kleban" wrote: > Is there any reason I can't use methods such as CreateShortField or > CreateVarCharField to add additional fields after a table has been created > when using the Classes way? > I.e. instead of including the following line in the Table constructor... > > fSpanLen = new VULong( "FSpanLen" ) > ... simply create only some fields in the constructor and leave some field > variables such as fSpanLen equal to nil... then much later, when needed, > come along and call... > > fSpanLen = myTable.CreateULongField( "FSpanLen" ) I have never try CreateXXXX is direct command to EXISTED and OPENED db. I think > ----- > > If I do this, then presumably when fSpanLen is created it will have the same > number of records as all other fields of myTable, and the fSpanLen field > value for each row will be initialzed to 0 (SetBlank) when the column is > created, correct? -- 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] From Ed at Kleban.com Fri Dec 2 09:54:01 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 2 09:54:32 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 11/30/05 9:41 AM, "Ruslan Zasukhin" wrote: > On 11/28/05 8:13 PM, "Ed Kleban" wrote: > >> ...then I'm presuming that... >> >> Vcursor.AddRecord() >> will add a new record to BOTH the cursor as well as to the original table, >> correct? > > Yes. > > Cursor must be ReadOnly = false > > In fact, such cursor do not have own records. It work over original Which cursors do not have their own records? ReadOnly = false cursors? or all cursors? Essentially you're telling me that the cursor you get back when readonly = false is internally a bitSet or an ArraySet. Is there a technical reason why you could not provide the functions: VCursor.AsArraySet() as VArraySet Vcursor.AsBitSet() as VBitSet Which is different from the question: Is there a philisophical reason why you would NOT like to provide these functions? >> And what is done for fields in the original table that are not included in >> the cursor? Presumably they are set to their blank value equivalents? > > BLANK From ayu8 at cdc.gov Fri Dec 2 11:31:53 2005 From: ayu8 at cdc.gov (Sims, John) Date: Fri Dec 2 10:46:00 2005 Subject: Sets from Cursors Re: VCursor.AddRecord Message-ID: > -----Original Message----- > From: valentina-bounces@lists.macserve.net > [mailto:valentina-bounces@lists.macserve.net] On Behalf Of Ed Kleban > Sent: Friday, December 02, 2005 10:54 AM > To: Valentina Developers > Subject: Sets from Cursors Re: VCursor.AddRecord > > > > > On 11/30/05 9:41 AM, "Ruslan Zasukhin" > wrote: > > > On 11/28/05 8:13 PM, "Ed Kleban" wrote: > > > >> ...then I'm presuming that... > >> > >> Vcursor.AddRecord() > >> will add a new record to BOTH the cursor as well as to the > original > >> table, correct? > > > > Yes. > > > > Cursor must be ReadOnly = false > > > > In fact, such cursor do not have own records. It work over original > > Which cursors do not have their own records? > ReadOnly = false cursors? > or all cursors? > > Essentially you're telling me that the cursor you get back > when readonly = false is internally a bitSet or an ArraySet. > > Is there a technical reason why you could not provide the > functions: > > VCursor.AsArraySet() as VArraySet > Vcursor.AsBitSet() as VBitSet > > Which is different from the question: > > Is there a philisophical reason why you would NOT like to > provide these functions? > > Hi Ed, I certainly can't answer for Ruslan, but one thing that occurred to me immediately is the fact that VArraySets and VBitSets only hold the RecID's of the records and, of course, the Vcursor may hold many different fields. I'm not sure what the use of converting the Vcursor to a Vset would be unless you just wanted to get the RecID's of the records in the Vcursor to iterate through them outside of the Vcursor...which would allow you to make modifications to fields not in the Vcursor, meaning you wouldn't have to request that data in the first place, which lowers the amount of data moving back-and-forth/network traffic ... Ok, I've kind of talked myself into liking this suggestion :-) Ruslan? -John From Ed at Kleban.com Fri Dec 2 11:52:17 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 2 11:52:45 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 10:31 AM, "Sims, John" wrote: > >> Is there a technical reason why you could not provide the >> functions: >> >> VCursor.AsArraySet() as VArraySet >> Vcursor.AsBitSet() as VBitSet >> >> Which is different from the question: >> >> Is there a philisophical reason why you would NOT like to >> provide these functions? >> >> > > Hi Ed, > > I certainly can't answer for Ruslan, Certainly none of us can. We users may be many things, but being Ruslan is not one of them. -- Ya gotta wonder how well that sentence translates to Ukrainian. > but one thing that occurred to me > immediately is the fact that VArraySets and VBitSets only hold the > RecID's of the records and, of course, the Vcursor may hold many > different fields. Yes, but in the cases I'd want to use this I would likely issue an SQL command that ONLY returned RecID fields. In fact if possible, I'd have it return no fields at all, because in the end what I'm after is the bitSet or ArraySet. > I'm not sure what the use of converting the Vcursor > to a Vset would be unless you just wanted to get the RecID's of the > records in the Vcursor to iterate through them outside of the > Vcursor... That's exactly what I want it for. > which would allow you to make modifications to fields not in > the Vcursor, meaning you wouldn't have to request that data in the first > place, which lowers the amount of data moving back-and-forth/network > traffic ... You make a great straight man. How much would you charge for this service on an ongoing basis? Perhaps we can work out a deal. > Ok, I've kind of talked myself into liking this suggestion > :-) > > Ruslan? Yeah, you've got the idea alright. Consider the following. There are a good many things where either the most efficient or the ONLY way to accomplish them is by issuing a SQL query to obtain a cursor. But there is also a complete set of very efficient search commands available through the V2 API that are much faster than using SQL for simple queries since: 1) You don't need to write the SQL, 2) The SQL parser doesn't need to read and mess with the SQL, and most importantly 3) Using the API calls you get sheer Ruslan-hand optimized speed as opposed to the best that the Ruslan SQL optimization logic can come up with. Unfortunately, there is no bridge between these two mechanisms since the Find commands work only on tables, not cursors, and the first time I even hinted at it Ruslan almost had a major heart attack right here in the email list. Which is certainly something none of us want. Consider an example: Ruslan has just added bit_and & friends which can now be used do blindingly fast genetic searches on a gazillion records to find the 1% that most likely have the candidates you care about. But you still have to weed through all those candidates. You could write a far more complex query in SQL that would eventually get the job done and return fully qualified matches. Alternatively you could write a loop that manually traversed over each record returned in the cursor and apply whatever logic you'd like written in the native development language. But I'm guessing that there is a large class of sophisticated conditional checks you might want to do for which by far the most efficient tool to weed these out is some variation of: aVBitSetOfRecsIwant = FindXxxx( withinVBitSetFromCursor ... ) Or possibly a successive chain of such calls. Now it may turn out that Ruslan will end up telling us this is foolish, because no matter how much less efficient SQL is compared with the API calls, that the overhead of Creating, Parsing, and running a single SQL call is so minimal that you're far better off investing the time in letting SQL do all the work in a single query. That may be true, but I'd like to hear him chime in on the topic. I always learn good things when he does. From ayu8 at cdc.gov Fri Dec 2 13:35:07 2005 From: ayu8 at cdc.gov (Sims, John) Date: Fri Dec 2 12:53:49 2005 Subject: Sets from Cursors Re: VCursor.AddRecord Message-ID: > -----Original Message----- > From: valentina-bounces@lists.macserve.net > [mailto:valentina-bounces@lists.macserve.net] On Behalf Of Ed Kleban > Sent: Friday, December 02, 2005 12:52 PM > To: Valentina Developers > Subject: Re: Sets from Cursors Re: VCursor.AddRecord > > > > > On 12/2/05 10:31 AM, "Sims, John" wrote: > > > > >> Is there a technical reason why you could not provide the > >> functions: > >> > >> VCursor.AsArraySet() as VArraySet > >> Vcursor.AsBitSet() as VBitSet > >> > >> Which is different from the question: > >> > >> Is there a philisophical reason why you would NOT like > to provide > >> these functions? > >> > >> > > > > Hi Ed, > > > > I certainly can't answer for Ruslan, > > Certainly none of us can. We users may be many things, but > being Ruslan is > not one of them. > -- Ya gotta wonder how well that sentence translates to Ukrainian. > > > but one thing that occurred to me > > immediately is the fact that VArraySets and VBitSets only hold the > > RecID's of the records and, of course, the Vcursor may hold many > > different fields. > > Yes, but in the cases I'd want to use this I would likely > issue an SQL command that ONLY returned RecID fields. In > fact if possible, I'd have it return no fields at all, > because in the end what I'm after is the bitSet or ArraySet. > > > I'm not sure what the use of converting the Vcursor to a > Vset would be > > unless you just wanted to get the RecID's of the records in the > > Vcursor to iterate through them outside of the Vcursor... > > That's exactly what I want it for. > > > which would allow you to make modifications to fields not in the > > Vcursor, meaning you wouldn't have to request that data in > the first > > place, which lowers the amount of data moving > back-and-forth/network > > traffic ... > > You make a great straight man. How much would you charge for > this service on an ongoing basis? Perhaps we can work out a deal. Abbott and Costello Laurel and Hardy Kleban and Sims ---- Doesn't quite have the same ring to it :-) That said, I'm willing to do the straight man thing for free. As for the topic at hand, we could certainly work around this by making sure to request RecID for the Vcursor then iterating through the Vcursor and pushing the RecID into an Array (or custom class if you wanted to do fancier things) but it would be nice to not have to request the RecID and still get the benefit of being able to iterate through the RecIDs. You know, as I'm typing here, it has occurred to me that Vset has Append/Remove methods so we could really just do this ourselves (though, performance-wise, probably not as fast as Ruslan could implement). But, we could extend Vcursor (I'm pretty sure you are an RB guy) and add a ToBitSet and/or ToArraySet method ourselves. As long as you remembered to pull back the RecID in the query, this shouldn't be too difficult to do. Even more interesting might be if you pulled back the RecID of the "main" table and the RecID(s) of a related table(s), you could make the extends methods where you pass the field from the Vcursor you want to create a Vset for then you could easily create an iterator for both the "main" table and the related table(s). Ok, I gotta get back to work. Sorry for the "stream of thought" post. I don't have time to really thing through all of this here at work. I hope I have made enough sense. Take care. -John From don at thinkingpublications.com Fri Dec 2 13:17:37 2005 From: don at thinkingpublications.com (Don Toro) Date: Fri Dec 2 13:23:13 2005 Subject: Classic Application Message-ID: <531A8F985242FE4EAC59FAE1F3676357CF6D27@mcsrv1.mckinley.dom> I am trying to get my application to work in Mac OS 9. I am using RunRev 2.6.1 and it is working fine in Windows and Mac OS X. Now I have been trying to test it on Mac OS 9 and I cannot get it to work. Here's how my program works. The start up stack loads a library wrapper stack where all the database handlers are located. The other stacks make calls to the handlers in the library. Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy the CODE from the VXCMD_Test.mc to the library stack. The library stack is MetaCard stack not a RunRev, stack in case that makes a difference. I even set the path of the externals to the VXCMD_Classic_MC in the Extensions folder. I have tried different combination by copying the CODE to the start up stack and the stacks that call the library but no luck. I get and error message when I open the start up stack "A program error has occurred. Please try again. (DBError)." If I run the VXCMD_Test.mc it runs fine. My guess is, it is not finding the external for some reason. Any help would be greatly appreciated. Thank you. Donard Toro Information Manager/Computer Programmer ------------------------------------------------------------------- Thinking Publications, a division of McKinley Companies, Inc. 424 Galloway Street, Eau Claire, WI 54703 Phone: 1.800.225.4769 (US) & 1.715.832.2488 Fax: 1.800.828.8885 (US) & 1.715.832.9082 www.ThinkingPublications.com ------------------------------------------------------------------- COMMUNICATION SOLUTIONS THAT CHANGE LIVES Specializing in resources for individuals with speaking, listening, reading, writing, and thinking skill deficits From Ed at Kleban.com Fri Dec 2 15:09:46 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 2 15:10:15 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 12:35 PM, "Sims, John" wrote: > Abbott and Costello > Laurel and Hardy > Kleban and Sims ---- Doesn't quite have the same ring to it :-) > > That said, I'm willing to do the straight man thing for free. > > As for the topic at hand, we could certainly work around this by making > sure to request RecID for the Vcursor then iterating through the Vcursor > and pushing the RecID into an Array (or custom class if you wanted to do > fancier things) but it would be nice to not have to request the RecID > and still get the benefit of being able to iterate through the RecIDs. > > You know, as I'm typing here, it has occurred to me that Vset has > Append/Remove methods so we could really just do this ourselves (though, > performance-wise, probably not as fast as Ruslan could implement). But, > we could extend Vcursor (I'm pretty sure you are an RB guy) and add a > ToBitSet and/or ToArraySet method ourselves. As long as you remembered > to pull back the RecID in the query, this shouldn't be too difficult to > do. Even more interesting might be if you pulled back the RecID of the > "main" table and the RecID(s) of a related table(s), you could make the > extends methods where you pass the field from the Vcursor you want to > create a Vset for then you could easily create an iterator for both the > "main" table and the related table(s). > > Ok, I gotta get back to work. Sorry for the "stream of thought" post. > I don't have time to really thing through all of this here at work. I > hope I have made enough sense. Technical sense? yes. Practical sense? no. Efficiency is the name of the game here. I have no interest in manually building a VSet through a tortuously slow procedure just so I can have the benefit of passing it to a function that can use it rapidly. Far better to just write the more complex SQL or iterate through the cursor and be done with it. > Take care. > From sunshine at public.kherson.ua Fri Dec 2 23:10:46 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 2 15:11:20 2005 Subject: [VXCMD-1] Classic Application In-Reply-To: <531A8F985242FE4EAC59FAE1F3676357CF6D27@mcsrv1.mckinley.dom> Message-ID: On 12/2/05 9:17 PM, "Don Toro" wrote: Hi Don, > I am trying to get my application to work in Mac OS 9. I am using RunRev 2.6.1 > and it is working fine in Windows and Mac OS X. Now I have been trying to test > it on Mac OS 9 and I cannot get it to work. > Here's how my program works. > > The start up stack loads a library wrapper stack where all the database > handlers are located. The other stacks make calls to the handlers in the > library. > Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy the CODE > from the VXCMD_Test.mc to the library stack. First of all -- can you get Example Stack working on OS 9 ? > The library stack is MetaCard > stack not a RunRev, stack in case that makes a difference. > I even set the path > of the externals to the VXCMD_Classic_MC in the Extensions folder. I have > tried different combination by copying the CODE to the start up stack and the > stacks that call the library but no luck. I get and error message when I open > the start up stack "A program error has occurred. Please try again. > (DBError)." > If I run the VXCMD_Test.mc it runs fine. Aha, this is answer to my question... > My guess is, it is not finding the external for some reason. Any help would be > greatly appreciated. Thank you. It sounds like question more suitable for rev-list. Although may be local REV experts will help you. Robert? Trevor? -- 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] From rjb at robelko.com Sat Dec 3 04:59:14 2005 From: rjb at robelko.com (Robert Brenstein) Date: Fri Dec 2 22:04:21 2005 Subject: [VXCMD] Classic Application Message-ID: >I am trying to get my application to work in Mac OS 9. I am using >RunRev 2.6.1 and it is working fine in Windows and Mac OS X. Now I >have been trying to test it on Mac OS 9 and I cannot get it to work. > >Here's how my program works. > >The start up stack loads a library wrapper stack where all the >database handlers are located. The other stacks make calls to the >handlers in the library. > >Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy >the CODE from the VXCMD_Test.mc to the library stack. The library >stack is MetaCard stack not a RunRev, stack in case that makes a >difference. I even set the path of the externals to the >VXCMD_Classic_MC in the Extensions folder. I have tried different >combination by copying the CODE to the start up stack and the stacks >that call the library but no luck. I get and error message when I >open the start up stack "A program error has occurred. Please try >again. (DBError)." If I run the VXCMD_Test.mc it runs fine. My guess >is, it is not finding the external for some reason. Any help would >be greatly appreciated. Thank you. > >Donard Toro >Information Manager/Computer Programmer Ahh, a light went on just after I sent the previous email! You are using RevDB. I wonder whether it is fixed to work with the current version of Valentina, which I presume you are trying to use. It used to require a custom version included in Rev distribution. Your setup will probably work fine if you access Valentina directly not through RevDB. The "version" test in the prev email will confirm it. Robert From rjb at robelko.com Sat Dec 3 04:55:22 2005 From: rjb at robelko.com (Robert Brenstein) Date: Fri Dec 2 22:04:24 2005 Subject: [VXCMD] Classic Application In-Reply-To: <531A8F985242FE4EAC59FAE1F3676357CF6D27@mcsrv1.mckinley.dom> References: <531A8F985242FE4EAC59FAE1F3676357CF6D27@mcsrv1.mckinley.dom> Message-ID: >I am trying to get my application to work in Mac OS 9. I am using >RunRev 2.6.1 and it is working fine in Windows and Mac OS X. Now I >have been trying to test it on Mac OS 9 and I cannot get it to work. > >Here's how my program works. > >The start up stack loads a library wrapper stack where all the >database handlers are located. The other stacks make calls to the >handlers in the library. > >Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy >the CODE from the VXCMD_Test.mc to the library stack. The library >stack is MetaCard stack not a RunRev, stack in case that makes a >difference. I even set the path of the externals to the >VXCMD_Classic_MC in the Extensions folder. I have tried different >combination by copying the CODE to the start up stack and the stacks >that call the library but no luck. I get and error message when I >open the start up stack "A program error has occurred. Please try >again. (DBError)." If I run the VXCMD_Test.mc it runs fine. My guess >is, it is not finding the external for some reason. Any help would >be greatly appreciated. Thank you. > >Donard Toro >Information Manager/Computer Programmer MetaCard is not an issue. It works just fine with Valentina 1.x under OS9. At glance, your setup looks okay: shared library in the extensions folder and the external in a library stack. If the library is in use, it should work. Try answer valentina("version") in your stack or from message box. May be you get a more meaningful error. This should work without initializing Valentina. If it says Valentina is not known, then your script can't see the code resource. If you get nowhere, contact me off the list and I try to help you to get things right. By the way, you don't need to set the external property under OS9 at all. From sunshine at public.kherson.ua Sat Dec 3 10:04:20 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 02:04:51 2005 Subject: [VXCMD] Classic Application In-Reply-To: Message-ID: On 12/3/05 5:59 AM, "Robert Brenstein" wrote: >> Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy >> the CODE from the VXCMD_Test.mc to the library stack. The library >> stack is MetaCard stack not a RunRev, stack in case that makes a >> difference. I even set the path of the externals to the >> VXCMD_Classic_MC in the Extensions folder. I have tried different >> combination by copying the CODE to the start up stack and the stacks >> that call the library but no luck. I get and error message when I >> open the start up stack "A program error has occurred. Please try >> again. (DBError)." If I run the VXCMD_Test.mc it runs fine. My guess >> is, it is not finding the external for some reason. Any help would >> be greatly appreciated. Thank you. >> >> Donard Toro >> Information Manager/Computer Programmer > > > Ahh, a light went on just after I sent the previous email! You are > using RevDB. I wonder whether it is fixed to work with the current > version of Valentina, which I presume you are trying to use. It used > to require a custom version included in Rev distribution. Your setup > will probably work fine if you access Valentina directly not through > RevDB. The "version" test in the prev email will confirm it. As I see he try to use VXCMD 1.x Names of archives say this VXCMD_Classic_MC -- 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] From sunshine at public.kherson.ua Sat Dec 3 10:27:08 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 02:27:37 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 5:54 PM, "Ed Kleban" wrote: Hi Ed, >> Cursor must be ReadOnly = false >> >> In fact, such cursor do not have own records. It work over original > > Which cursors do not have their own records? > ReadOnly = false cursors? > or all cursors? Not all. Cursor -- is RESULT of SQL query SELECT. You can note that SELECT can be on SINGLE table or to few tables. Single table SELECT return you cursor which you you can modify. it have no own records AT LEAST right now. Future we can add options. Few table cursor (JOIN) -- is READ ONLY cursor. a) simple joins do not require new table b) e.g. GROUP BY do You as Develop actually should not care if exists tmp table or not. Only you can check: if cursor is read only or no. > Essentially you're telling me that the cursor you get back when readonly = > false is internally a bitSet or an ArraySet. It is MORE COMPLEX structure than ArraySet, But yes it do USE ArraySet > Is there a technical reason why you could not provide the functions: > > VCursor.AsArraySet() as VArraySet > Vcursor.AsBitSet() as VBitSet No. Just they should be used only for single table cursor. > Which is different from the question: > > Is there a philisophical reason why you would NOT like to provide these > functions? In Mantis exists such request. Or ... In was request to add ability convert ArraySet into Cursor...and this is more hard, because also it needs specify fields...and I do not see huge advantage... -- 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] From sunshine at public.kherson.ua Sat Dec 3 10:58:37 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 03:03:59 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 7:52 PM, "Ed Kleban" wrote: > Ruslan has just added bit_and & friends which can now be used do blindingly > fast genetic searches on a gazillion records to find the 1% that most likely > have the candidates you care about. But you still have to weed through all > those candidates. You could write a far more complex query in SQL that > would eventually get the job done and return fully qualified matches. > Alternatively you could write a loop that manually traversed over each > record returned in the cursor and apply whatever logic you'd like written in > the native development language. But I'm guessing that there is a large > class of sophisticated conditional checks you might want to do for which by > far the most efficient tool to weed these out is some variation of: > > aVBitSetOfRecsIwant = FindXxxx( withinVBitSetFromCursor ... ) TIP: If you KNOW that you will find few records (1%) Then it is better use ArraySet. -- 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] From sunshine at public.kherson.ua Sat Dec 3 10:59:38 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 03:04:01 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 7:52 PM, "Ed Kleban" wrote: > Now it may turn out that Ruslan will end up telling us this is foolish, > because no matter how much less efficient SQL is compared with the API > calls, that the overhead of Creating, Parsing, and running a single SQL call > is so minimal that you're far better off investing the time in letting SQL > do all the work in a single query. That may be true, but I'd like to hear > him chime in on the topic. I always learn good things when he does. Noooooooooooooooo If SQL is best of the best, then why you think we have ad in v2 API methods? :-) -- 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] From sunshine at public.kherson.ua Sat Dec 3 11:02:28 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 03:04:05 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 8:35 PM, "Sims, John" wrote: > You know, as I'm typing here, it has occurred to me that Vset has > Append/Remove methods so we could really just do this ourselves (though, > performance-wise, probably not as fast as Ruslan could implement). > But, > we could extend Vcursor (I'm pretty sure you are an RB guy) and add a > ToBitSet and/or ToArraySet method ourselves. I think here problem. Db.SqlSelect still will return you Vcursor, But not yourCursor More correct design here to use -- algorithms. Methods which accept VCursor But of course it is better move this into plugin, C++ code > As long as you remembered > to pull back the RecID in the query, this shouldn't be too difficult to > do. Even more interesting might be if you pulled back the RecID of the > "main" table and the RecID(s) of a related table(s), you could make the > extends methods where you pass the field from the Vcursor you want to > create a Vset for then you could easily create an iterator for both the > "main" table and the related table(s). > > Ok, I gotta get back to work. Sorry for the "stream of thought" post. > I don't have time to really thing through all of this here at work. I > hope I have made enough sense. -- 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] From sunshine at public.kherson.ua Sat Dec 3 11:28:00 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 03:28:31 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/2/05 11:09 PM, "Ed Kleban" wrote: > Technical sense? yes. Practical sense? no. Efficiency is the name of the > game here. I have no interest in manually building a VSet through a > tortuously slow procedure just so I can have the benefit of passing it to a > function that can use it rapidly. Far better to just write the more > complex SQL or iterate through the cursor and be done with it. Btw, I have realize only now Vcursor already keep ArraySet, so it will take ZERO time to give you that ArraySet. And no Additional RAM. But come issues as: what todo if you will start add items into ArryaSet. well legal steps .. -- 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] From jda at his.com Sat Dec 3 08:09:06 2005 From: jda at his.com (jda) Date: Sat Dec 3 07:09:34 2005 Subject: DeleteAllRecords crash In-Reply-To: References: Message-ID: Hi Ruslan, I've found another showstopper bug (in 2.0.5). I added 12 new VVarChar fields to my db. Now when I create a fresh db, select some records in a cursor, and do tempCursor.DeleteAllRecords I get this crash Thread 0 Crashed: 0 Kernel_Carbon_Final.shlb 0x04e2cc5c SetRecordCount__Q23fbl11VarCharFileFUl + 36 1 Kernel_Carbon_Final.shlb 0x04e2cbe8 SetRecordCount__Q23fbl14VarCharStorageFUl + 20 2 Kernel_Carbon_Final.shlb 0x04c2bf00 ForEachFieldStorage,Ul>>__Q23fbl16TableStorage_ImpFQ23std59binder2nd,Ul>_v + 144 3 Kernel_Carbon_Final.shlb 0x04c2d394 Truncate__Q23fbl21TableStorage_SeparateFUl + 92 4 Kernel_Carbon_Final.shlb 0x04c2d01c OnDeleteRecord__Q23fbl21TableStorage_SeparateFUl + 216 5 Kernel_Carbon_Final.shlb 0x04c25454 DoDeleteRecordFast__Q23fbl5TableFUl + 120 6 Kernel_Carbon_Final.shlb 0x04c25158 DeleteAllRecordsFast__Q23fbl5TableFQ23fbl24smart_ptr + 556 7 Kernel_Carbon_Final.shlb 0x04c24d84 DeleteAllRecords__Q23fbl5TableFQ23fbl21smart_ptr + 444 8 Kernel_Carbon_Final.shlb 0x04c36f50 DeleteAllRecords__Q23fbl14Table_IndirectFv + 244 9 Kernel_Carbon_Final.shlb 0x04c559c0 DeleteAllRecords__Q24vsql6CursorFv + 264 10 Plugin 0x049d5cbc Cursor_DeleteAllRecords__FP16REALobjectStruct + 216 Jon From sunshine at public.kherson.ua Sat Dec 3 15:33:55 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 07:34:25 2005 Subject: DeleteAllRecords crash In-Reply-To: Message-ID: On 12/3/05 3:09 PM, "jda" wrote: Hi Jon, > Hi Ruslan, > > I've found another showstopper bug (in 2.0.5). > > I added 12 new VVarChar fields to my db. Now when I create a fresh > db, select some records in a cursor, and do > > tempCursor.DeleteAllRecords > > I get this crash I need something for testing And please report into Mantis -- 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] From Ed at Kleban.com Sat Dec 3 08:43:01 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sat Dec 3 08:43:31 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/3/05 2:27 AM, "Ruslan Zasukhin" wrote: > On 12/2/05 5:54 PM, "Ed Kleban" wrote: > > Hi Ed, > >>> Cursor must be ReadOnly = false >>> >>> In fact, such cursor do not have own records. It work over original >> >> Which cursors do not have their own records? >> ReadOnly = false cursors? >> or all cursors? > > Not all. > > Cursor -- is RESULT of SQL query SELECT. Yes, of course. > You can note that SELECT can be on SINGLE table or to few tables. > > Single table SELECT return you cursor which you you can modify. > it have no own records AT LEAST right now. Future we can add options. Nice to know, but its unlikely I'll ever want to modify a cursor obtained this way. > Few table cursor (JOIN) -- is READ ONLY cursor. > a) simple joins do not require new table > b) e.g. GROUP BY do > > You as Develop actually should not care if exists tmp table or not. > Only you can check: if cursor is read only or no. Ah! Good to know. I missed that point. So you can test whether the cursor is ReadOnly when you get VCursor back from the SQL search, and its state will depend upon the nature of the request you made. I understand. >> Essentially you're telling me that the cursor you get back when readonly = >> false is internally a bitSet or an ArraySet. > > It is MORE COMPLEX structure than ArraySet, > But yes it do USE ArraySet > >> Is there a technical reason why you could not provide the functions: >> >> VCursor.AsArraySet() as VArraySet >> Vcursor.AsBitSet() as VBitSet > > No. > > Just they should be used only for single table cursor. > >> Which is different from the question: >> >> Is there a philisophical reason why you would NOT like to provide these >> functions? > > In Mantis exists such request. > > Or ... In was request to add ability convert > ArraySet into Cursor...and this is more hard, because also it needs > specify fields...and I do not see huge advantage... > I see no benefit to this. My goal is to go from Cursor to VSet (Bit and Array) so that we can take advantage of the faster API FindXxxx calls for post-processing. On 12/3/05 2:58 AM, "Ruslan Zasukhin" wrote: > > TIP: > > If you KNOW that you will find few records (1%) > > Then it is better use ArraySet. Yes, of course. Good advice. On 12/3/05 2:59 AM, "Ruslan Zasukhin" wrote: > On 12/2/05 7:52 PM, "Ed Kleban" wrote: > >> Now it may turn out that Ruslan will end up telling us this is foolish, >> because no matter how much less efficient SQL is compared with the API >> calls, that the overhead of Creating, Parsing, and running a single SQL call >> is so minimal that you're far better off investing the time in letting SQL >> do all the work in a single query. That may be true, but I'd like to hear >> him chime in on the topic. I always learn good things when he does. > > Noooooooooooooooo > > If SQL is best of the best, then why you think we have ad in v2 API methods? > :-) That's quite a loud chime :) Ok. Then I'll take that as agreement that there is merit to this idea and will add a Manits request to provide conversion from a VCursor to ArraySet and BitSet -- at least for Cursors derived from a single Table as indicated by VCursor.ReadOnly = false. On 12/3/05 3:02 AM, "Ruslan Zasukhin" wrote: > On 12/2/05 8:35 PM, "Sims, John" wrote: > >> You know, as I'm typing here, it has occurred to me that Vset has >> Append/Remove methods so we could really just do this ourselves (though, >> performance-wise, probably not as fast as Ruslan could implement). > >> But, >> we could extend Vcursor (I'm pretty sure you are an RB guy) and add a >> ToBitSet and/or ToArraySet method ourselves. > > I think here problem. Db.SqlSelect still will return you Vcursor, > But not yourCursor > > More correct design here to use -- algorithms. > Methods which accept Vcursor Ah! You mean change the Vfield.FindXxxx commands so that they will accept a VCursor as well as accepting a VBitSet or VArraySet for inSelection? Yes, that of course would be optimal... but also a lot more work to add I'm guessing. > But of course it is better move this into plugin, C++ code > On 12/3/05 3:28 AM, "Ruslan Zasukhin" wrote: > On 12/2/05 11:09 PM, "Ed Kleban" wrote: > >> Technical sense? yes. Practical sense? no. Efficiency is the name of the >> game here. I have no interest in manually building a VSet through a >> tortuously slow procedure just so I can have the benefit of passing it to a >> function that can use it rapidly. Far better to just write the more >> complex SQL or iterate through the cursor and be done with it. > > Btw, I have realize only now > > Vcursor already keep ArraySet, so it will take ZERO time to give you that > ArraySet. And no Additional RAM. Very good! And presumably minimal coding as well if you simply provided a single additional method: Vcursor.GetArraySet( ) as VArraySet // Returns nil if VCursor.ReadOnly is true > But come issues as: > > what todo if you will start add items into ArryaSet. > well legal steps .. In the short term, you just document the fact that "If you add items to an ArraySet you get from VCursor.GetArraySet then horrible things will happen that you will regret for the rest of your life." In the long term, you just add an internal flag on ArraySets to note that it is "Locked" and cannot be extended. Very good. I'll added Mantis request #0001170 for this. Thanks for the fine replies. --Ed From don at thinkingpublications.com Sat Dec 3 10:19:14 2005 From: don at thinkingpublications.com (Don Toro) Date: Sat Dec 3 10:25:10 2005 Subject: [VXCMD] Classic Application Message-ID: <531A8F985242FE4EAC59FAE1F367635705350E@mcsrv1.mckinley.dom> I'll try that and let you know. Thank you. -----Original Message----- From: Robert Brenstein [mailto:rjb@robelko.com] Sent: Fri 12/2/2005 9:55 PM To: Valentina Developers Cc: Subject: Re: [VXCMD] Classic Application >I am trying to get my application to work in Mac OS 9. I am using >RunRev 2.6.1 and it is working fine in Windows and Mac OS X. Now I >have been trying to test it on Mac OS 9 and I cannot get it to work. > >Here's how my program works. > >The start up stack loads a library wrapper stack where all the >database handlers are located. The other stacks make calls to the >handlers in the library. > >Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy >the CODE from the VXCMD_Test.mc to the library stack. The library >stack is MetaCard stack not a RunRev, stack in case that makes a >difference. I even set the path of the externals to the >VXCMD_Classic_MC in the Extensions folder. I have tried different >combination by copying the CODE to the start up stack and the stacks >that call the library but no luck. I get and error message when I >open the start up stack "A program error has occurred. Please try >again. (DBError)." If I run the VXCMD_Test.mc it runs fine. My guess >is, it is not finding the external for some reason. Any help would >be greatly appreciated. Thank you. > >Donard Toro >Information Manager/Computer Programmer MetaCard is not an issue. It works just fine with Valentina 1.x under OS9. At glance, your setup looks okay: shared library in the extensions folder and the external in a library stack. If the library is in use, it should work. Try answer valentina("version") in your stack or from message box. May be you get a more meaningful error. This should work without initializing Valentina. If it says Valentina is not known, then your script can't see the code resource. If you get nowhere, contact me off the list and I try to help you to get things right. By the way, you don't need to set the external property under OS9 at all. _______________________________________________ Valentina mailing list Valentina@lists.macserve.net http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Sat Dec 3 19:42:26 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 3 11:42:55 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/3/05 4:43 PM, "Ed Kleban" wrote: >>> You know, as I'm typing here, it has occurred to me that Vset has >>> Append/Remove methods so we could really just do this ourselves (though, >>> performance-wise, probably not as fast as Ruslan could implement). >> >>> But, >>> we could extend Vcursor (I'm pretty sure you are an RB guy) and add a >>> ToBitSet and/or ToArraySet method ourselves. >> >> I think here problem. Db.SqlSelect still will return you Vcursor, >> But not yourCursor >> >> More correct design here to use -- algorithms. >> Methods which accept Vcursor > > Ah! You mean change the Vfield.FindXxxx commands so that they will accept a > VCursor as well as accepting a VBitSet or VArraySet for inSelection? Yes, > that of course would be optimal... but also a lot more work to add I'm > guessing. No, I mean that it need NOT sublass cursor and make own methods ToBitSet ToArraySet Instead just do global methods ToArraySet( inCursor ) as VArraySet -- 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] From Ed at Kleban.com Sat Dec 3 12:27:07 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sat Dec 3 12:27:37 2005 Subject: Sets from Cursors Re: VCursor.AddRecord In-Reply-To: Message-ID: On 12/3/05 11:42 AM, "Ruslan Zasukhin" wrote: > On 12/3/05 4:43 PM, "Ed Kleban" wrote: > >> Ah! You mean change the Vfield.FindXxxx commands so that they will accept a >> VCursor as well as accepting a VBitSet or VArraySet for inSelection? Yes, >> that of course would be optimal... but also a lot more work to add I'm >> guessing. > > No, I mean that it need NOT sublass cursor and make own methods > ToBitSet > ToArraySet > > Instead just do global methods > > ToArraySet( inCursor ) as VArraySet > Great. Works for me. You code it, I'll use it ;-) From jda at his.com Sun Dec 4 14:31:42 2005 From: jda at his.com (jda) Date: Sun Dec 4 13:32:14 2005 Subject: Weird VarChar field udpate behavior In-Reply-To: References: Message-ID: Hi Ruslan, I have a routine that changes the case of the text in a field (e.g. ruslan to RUSLAN). This works fine for an indexed VText field (where s = "RUSLAN"): myCursor.Field(fldName).setString(s) myCursor.updateRecord //ruslan -> RUSLAN However, it does NOT work for an indexed VarChar field -- the text is *not* updated: myCursor.Field(fldName).setString(s) myCursor.updateRecord // ruslan -> ruslan I can *force* it to udpate by doing this: myCursor.Field(fldNames).setString("") myCursor.updateRecord myCursor.Field(fldNames).setString(s) myCursor.updateRecord Looks like there may be an optimization in Valentina's code that mistakenly ignores case when updating VarChar fields (but not VText fields). Jon From sunshine at public.kherson.ua Mon Dec 5 00:02:34 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 4 16:03:05 2005 Subject: Weird VarChar field udpate behavior In-Reply-To: Message-ID: On 12/4/05 9:31 PM, "jda" wrote: Hi Jon, What is collation settings for you db? kPrimary? Else? > I have a routine that changes the case of the text in a field (e.g. > ruslan to RUSLAN). This works fine for an indexed VText field (where > s = "RUSLAN"): > > myCursor.Field(fldName).setString(s) > myCursor.updateRecord //ruslan -> RUSLAN > > However, it does NOT work for an indexed VarChar field -- the text is > *not* updated: > > myCursor.Field(fldName).setString(s) > myCursor.updateRecord // ruslan -> ruslan > > I can *force* it to udpate by doing this: > > myCursor.Field(fldNames).setString("") > myCursor.updateRecord > myCursor.Field(fldNames).setString(s) > myCursor.updateRecord > > Looks like there may be an optimization in Valentina's code that > mistakenly ignores case when updating VarChar fields (but not VText > fields). -- 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] From jda at his.com Sun Dec 4 17:45:42 2005 From: jda at his.com (jda) Date: Sun Dec 4 16:46:14 2005 Subject: Weird VarChar field udpate behavior In-Reply-To: References: Message-ID: >On 12/4/05 9:31 PM, "jda" wrote: > >Hi Jon, > >What is collation settings for you db? > kPrimary? Else? Hi Ruslan, It's kSecondary. Jon From fb at memedia.de Mon Dec 5 10:44:58 2005 From: fb at memedia.de (Florian Bogeschdorfer) Date: Mon Dec 5 03:45:42 2005 Subject: SQL question SOLVED In-Reply-To: Message-ID: <0ML2ov-1EjCuB1i5k-00028a@mrelayeu.kundenserver.de> > > And which way you have choose? :-) > I chose the NOT() way, since thie meant least work and no changes to the DB Florian From don at thinkingpublications.com Mon Dec 5 09:35:14 2005 From: don at thinkingpublications.com (Don Toro) Date: Mon Dec 5 09:40:57 2005 Subject: [VXCMD] Classic Application Message-ID: <531A8F985242FE4EAC59FAE1F3676357CF6D29@mcsrv1.mckinley.dom> I ran valentina("version") from the message box and I got "1.11" for response. So I figured it was a problem with my code. As I went through the library I noticed that the path for Classic was not being set. I always assumed that the path was being set correctly. Once I set the path correctly everything works perfectly fine. Thanks for all your help. Donard Toro Information Manager/Computer Programmer ------------------------------------------------------------------- Thinking Publications, a division of McKinley Companies, Inc. 424 Galloway Street, Eau Claire, WI 54703 Phone: 1.800.225.4769 (US) & 1.715.832.2488 Fax: 1.800.828.8885 (US) & 1.715.832.9082 www.ThinkingPublications.com ------------------------------------------------------------------- COMMUNICATION SOLUTIONS THAT CHANGE LIVES Specializing in resources for individuals with speaking, listening, reading, writing, and thinking skill deficits -----Original Message----- From: Don Toro Sent: Saturday, December 03, 2005 10:19 AM To: Valentina Developers Subject: RE: [VXCMD] Classic Application I'll try that and let you know. Thank you. -----Original Message----- From: Robert Brenstein [mailto:rjb@robelko.com] Sent: Fri 12/2/2005 9:55 PM To: Valentina Developers Cc: Subject: Re: [VXCMD] Classic Application >I am trying to get my application to work in Mac OS 9. I am using >RunRev 2.6.1 and it is working fine in Windows and Mac OS X. Now I >have been trying to test it on Mac OS 9 and I cannot get it to work. > >Here's how my program works. > >The start up stack loads a library wrapper stack where all the >database handlers are located. The other stacks make calls to the >handlers in the library. > >Now, I put the VXCMD_Classic_MC in the Extensions folder and I copy >the CODE from the VXCMD_Test.mc to the library stack. The library >stack is MetaCard stack not a RunRev, stack in case that makes a >difference. I even set the path of the externals to the >VXCMD_Classic_MC in the Extensions folder. I have tried different >combination by copying the CODE to the start up stack and the stacks >that call the library but no luck. I get and error message when I >open the start up stack "A program error has occurred. Please try >again. (DBError)." If I run the VXCMD_Test.mc it runs fine. My guess >is, it is not finding the external for some reason. Any help would >be greatly appreciated. Thank you. > >Donard Toro >Information Manager/Computer Programmer MetaCard is not an issue. It works just fine with Valentina 1.x under OS9. At glance, your setup looks okay: shared library in the extensions folder and the external in a library stack. If the library is in use, it should work. Try answer valentina("version") in your stack or from message box. May be you get a more meaningful error. This should work without initializing Valentina. If it says Valentina is not known, then your script can't see the code resource. If you get nowhere, contact me off the list and I try to help you to get things right. By the way, you don't need to set the external property under OS9 at all. _______________________________________________ Valentina mailing list Valentina@lists.macserve.net http://lists.macserve.net/mailman/listinfo/valentina From bwillius at gmx.de Mon Dec 5 18:42:42 2005 From: bwillius at gmx.de (Beatrix Willius) Date: Mon Dec 5 11:43:41 2005 Subject: Exporting to Text Message-ID: <6A79655D-C02F-4190-BEA3-BBB254897150@gmx.de> Hello, I want to export a Valentina database to a tab separated text file. The standard Valentina export is not used, because I want to give the user some feedback regarding the export when the databases get a bit bigger. How can I speed the below code up? From what I tried it seems that the loop through the records and fields and getting the strings takes the most time. The variable theArchiveFolderitem is (guess what?) as non-nil folderitem. The variable theDatabase is a Valentina database. dim theCursor as VCursor theCursor = theDatabase.SqlSelect("select * from message" , kV_Server, kV_ReadWrite, kV_Random) theArchive = theArchiveFolderitem.CreateBinaryFile("text") dim FieldValue as String dim theLine as new StringHandleMBS dim FieldCount as integer = theDatabase.BaseObject ("Message").FieldCount dim RecordCount as Integer = theCursor.RecordCount 'Loop through each row and save for currentRecord as integer = 1 to RecordCount theCursor.CurrentPosition = currentRecord 'get the values and add to line for currentField as integer = 1 to FieldCount if theCursor.Field(currentField).isNull then FieldValue = "" else FieldValue = theCursor.Field(currentField).GetString end if 'set encoding FieldValue = DefineEncoding(FieldValue, Encodings.MacRoman) 'replace return and tab if InStr(FieldValue, EndOfLine) > 0 then FieldValue = ReplaceAll(FieldValue, EndOfLine, "\return") end if if InStr(FieldValue, chr(9)) > 0 then FieldValue = ReplaceAll(FieldValue, chr(9), "\tab") end if 'add to line if theLine.Len = 0 then theLine.Add FieldValue else theLine.Add chr(9) + FieldValue end if next 'write in pieces of 1 MB if theLine.Len > 1000 * 1024 then theArchive.Write theLine.Copy + EndOfLine theLine.Delete 1, theLine.Len elseif currentRecord = theCursor.RecordCount then 'write end of archive theArchive.Write theLine.Copy end if next Using Valentina 1.11 RB with RB 2005.4 on Mac OS 10.4 Any ideas are appreciated. From sunshine at public.kherson.ua Mon Dec 5 20:21:33 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 5 12:22:09 2005 Subject: Exporting to Text In-Reply-To: <6A79655D-C02F-4190-BEA3-BBB254897150@gmx.de> Message-ID: On 12/5/05 7:42 PM, "Beatrix Willius" wrote: Hi Beatrix, > I want to export a Valentina database to a tab separated text file. > The standard Valentina export is not used, because I want to give the > user some feedback regarding the export when the databases get a bit > bigger. How can I speed the below code up? From what I tried it > seems that the loop through the records and fields and getting the > strings takes the most time. I wonder, do you see significant slow down comparing to Valentina's built-in export ? -- 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] From jda at his.com Mon Dec 5 19:02:52 2005 From: jda at his.com (jda) Date: Mon Dec 5 18:03:31 2005 Subject: Efficient use of text-containing field In-Reply-To: References: Message-ID: Hi Ruslan, I have lots of VarChar fields that will hold up to 1022 UTF-16 chars. Indexedbyword. I have a sort method for each. All I need is for the sort to account for, say, the first 16 chars. Here is what I'm doing now: newfield = CreateVarCharField("newfield", 1022, EVFlag.fNullable + EVFlag.fIndexed + EVFlag.fIndexByWords) newfield.storageEncoding = "UTF16" newfieldSortMethod = CreateVarCharField("newfieldSortMethod", 16, EVFlag.fNullable, "left(newfield, 16)") Is the sort method the most efficient (space-saving) way to do this? Or should I be doing something else? I do not need to be able to sort by the entire possible 1022 characters... Thanks, Jon From Ed at Kleban.com Mon Dec 5 20:26:45 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 5 20:27:22 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: One option if you're really concerned about performance because: 1) you have a LOT of records, and 2) a lot of the strings in VarChar(1022) field really are sizeable in length, i.e significantly longer than 16 characters, would be to create a separate string(16) field in the record and index that instead of indexing the VarChar field. Just include a copy of the first 16-chars of the VarChar field in that string field. The benefit is that you'll get optimal sorting speed, and minimal paging overhead since the sort routine won't have to haul in the entire text of the VarChar(1022) field when sorting the strings. nor again later when performing a binary search on them when you do a lookup. In fact you may as well do this since you can't use "Indexed" for sorting purposes on a VarChar field that's got IndexedByWords enabled. I'm sure Ruslan will correct me here if I'm wrong. And there's no way you are likely going to write a sort routine that is faster than the native indexing Ruslan already has built into Valentina unless you're going to code it in C. If you only need the sort for the purpose of doing lookups rather than a relative ordering of the strings, and if you don't need ranged searches (find all strings between "dinosaur" and "dog"), then by far the fastest way to do searches is to store a string hash in a Long field of the record. This is much more compact because you don't need to allocate the String(16) field, just a Long or Ulong; it totally eliminates the need for having to do a sort at all; and it will have minimal paging overhead to accomplish the search. Unfortunately Ruslan hasn't implemented EVFlags.fHashedIndex yet, so you have to allocate this field and manage it yourself manually rather than simply telling V2 that's how you want it to manage indexing of the VarChar(1022) field. This is what I do to avoid sorting and achieve phenomenal lookup performance. On 12/5/05 6:02 PM, "jda" wrote: > Hi Ruslan, > > I have lots of VarChar fields that will hold up to 1022 UTF-16 chars. > Indexedbyword. > > I have a sort method for each. All I need is for the sort to account > for, say, the first 16 chars. Here is what I'm doing now: > > newfield = CreateVarCharField("newfield", 1022, EVFlag.fNullable + > EVFlag.fIndexed + EVFlag.fIndexByWords) > newfield.storageEncoding = "UTF16" > newfieldSortMethod = CreateVarCharField("newfieldSortMethod", 16, > EVFlag.fNullable, "left(newfield, 16)") > > > Is the sort method the most efficient (space-saving) way to do this? > Or should I be doing something else? I do not need to be able to sort > by the entire possible 1022 characters... > > Thanks, > > Jon > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From jda at his.com Mon Dec 5 21:32:31 2005 From: jda at his.com (jda) Date: Mon Dec 5 20:33:04 2005 Subject: Efficient use of text-containing field In-Reply-To: References: Message-ID: >One option if you're really concerned about performance because: > > 1) you have a LOT of records, and > 2) a lot of the strings in VarChar(1022) field really are sizeable in > length, i.e significantly longer than 16 characters, > > > > > > Is the sort method the most efficient (space-saving) way to do this? As I said, I do not care about performance. It is already blazingly fast. I care about size/space. Jon From Ed at Kleban.com Mon Dec 5 20:46:24 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 5 20:47:00 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/5/05 8:32 PM, "jda" wrote: >> One option if you're really concerned about performance because: >> >> 1) you have a LOT of records, and >> 2) a lot of the strings in VarChar(1022) field really are sizeable in >> length, i.e significantly longer than 16 characters, >> >> >>> >>> Is the sort method the most efficient (space-saving) way to do this? > > As I said, I do not care about performance. It is already blazingly > fast. I care about size/space. > Yes, but you did not explain why you needed the items sorted, which would determine whether the hash approach I suggest would be viable for your needs. If so, it's unlikely you'll find a more space-efficient way of doing it. If not, then the String(16) approach is probably your best bet, because as I noted you can't index a field declared as IndexByWords. If speed is a total non issue and you only needed do the sort once after filling the table and then using it read-only you could certainly use the String(16) approach to sort, then fill in a SortOrder field based upon the result, and then throw the String(16) field away... Or build the String(16) array in a parallel temporary table that you subsequently punt. Hope that helps. From jda at his.com Mon Dec 5 22:25:21 2005 From: jda at his.com (jda) Date: Mon Dec 5 21:25:55 2005 Subject: Efficient use of text-containing field In-Reply-To: References: Message-ID: > > >If not, then the String(16) approach is probably your best bet, because as I >noted you can't index a field declared as IndexByWords. If speed is a total >non issue and you only needed do the sort once after filling the table and >then using it read-only you could certainly use the String(16) approach to >sort, then fill in a SortOrder field based upon the result, and then throw >the String(16) field away... Or build the String(16) array in a parallel >temporary table that you subsequently punt. > >Hope that helps. > Thank you, but I need the VarChar to store the data (which can be large) and is indexed by word. That is why I need a sort method that is not indexed by word. My question to Ruslan is whether VarChar(16) saves me storage space. Ruslan? Jon From Ed at Kleban.com Mon Dec 5 21:41:51 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 5 21:42:43 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/5/05 9:25 PM, "jda" wrote: >> >> >> If not, then the String(16) approach is probably your best bet, because as I >> noted you can't index a field declared as IndexByWords. If speed is a total >> non issue and you only needed do the sort once after filling the table and >> then using it read-only you could certainly use the String(16) approach to >> sort, then fill in a SortOrder field based upon the result, and then throw >> the String(16) field away... Or build the String(16) array in a parallel >> temporary table that you subsequently punt. >> >> Hope that helps. >> > > Thank you, but I need the VarChar to store the data (which can be > large) and is indexed by word. Great. No problem there. I understand. > That is why I need a sort method that > is not indexed by word. My question to Ruslan is whether VarChar(16) > saves me storage space. Since you're using IndexedByWord, as you say, then to also do a sort then yes, you'll need to allocate some other field. And if you only need to do the sort on the first 16 characters, then creating a VarChar(16) field with a copy of the first 16 characters of the VarChar(1022) field will indeed save you a tremendous amount of storage and be much more space efficient than having to create two VarChar(1022) fields -- one to be IndexedByWords, and one to be Indexed for sorting. If it is also the case that the vast majority of strings you have stored in the VarChar(16) field are at least 16 characters in length, then you can employ an additional optimization. You can declare the field of 16 characters to be String(16) instead of VarChar(16). The benefit of doing this is that if the majority of the VarChar(1022) fields actually have strings of at least 16 characters then this declaration will actually save you storage and be more compact because V2 does not need to store the per-page overhead bytes that allow it manage a VarChar field. Furthermore using String(16) will result in a sort that is faster because V2 can instantly calculate the precise position of every string record when it does it's comparisons to accomplish the sort by indexing the 16-char field, as well as speed any lookups you perform on that field once it is sorted. And then if storage efficiency is the most important, depending on why you wanted the field sorted in the first place there are additional optimizations you may be able to use to eliminate the String(16) field after you use it for sorting by replacing it with an even smaller field, as I alluded to in previous posts. But those are refinements you can simply ignore if they sound too scary or complex. > Ruslan? I'm sure Ruslan will chime in with a confirmation or a better idea when he gets a chance ;-) > Jon Good luck! --Ed From sunshine at public.kherson.ua Tue Dec 6 10:02:06 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 02:02:40 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 2:02 AM, "jda" wrote: Hi Jon, > I have lots of VarChar fields that will hold up to 1022 UTF-16 chars. > Indexedbyword. > > I have a sort method for each. All I need is for the sort to account > for, say, the first 16 chars. Here is what I'm doing now: > > newfield = CreateVarCharField("newfield", 1022, EVFlag.fNullable + > EVFlag.fIndexed + EVFlag.fIndexByWords) > newfield.storageEncoding = "UTF16" > newfieldSortMethod = CreateVarCharField("newfieldSortMethod", 16, > EVFlag.fNullable, "left(newfield, 16)") > > > Is the sort method the most efficient (space-saving) way to do this? > Or should I be doing something else? I do not need to be able to sort > by the entire possible 1022 characters... Yes this is the best way. You really need index on newfield also? You should understand you will have 2 different indexes for field then. -- 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] From sunshine at public.kherson.ua Tue Dec 6 10:04:40 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 02:05:14 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 5:25 AM, "jda" wrote: >> If not, then the String(16) approach is probably your best bet, because as I >> noted you can't index a field declared as IndexByWords. If speed is a total >> non issue and you only needed do the sort once after filling the table and >> then using it read-only you could certainly use the String(16) approach to >> sort, then fill in a SortOrder field based upon the result, and then throw >> the String(16) field away... Or build the String(16) array in a parallel >> temporary table that you subsequently punt. >> >> Hope that helps. >> > > Thank you, but I need the VarChar to store the data (which can be > large) and is indexed by word. That is why I need a sort method that > is not indexed by word. My question to Ruslan is whether VarChar(16) > saves me storage space. Ruslan? Yes of course. Index built on first 16 chars will be much less of index built on all. -- 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] From sunshine at public.kherson.ua Tue Dec 6 10:06:09 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 02:06:44 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 5:41 AM, "Ed Kleban" wrote: > Since you're using IndexedByWord, as you say, then to also do a sort then > yes, you'll need to allocate some other field. Ed, with Valentina no need to make COPY of data. You can just create calculated field, which will on the fly calculate value. And then Jon say: build index for this calculated field. So you get best case: one field which keep strings and 2 indexes around this field. > And if you only need to do > the sort on the first 16 characters, then creating a VarChar(16) field with > a copy of the first 16 characters of the VarChar(1022) field will indeed > save you a tremendous amount of storage and be much more space efficient > than having to create two VarChar(1022) fields -- one to be IndexedByWords, > and one to be Indexed for sorting. -- 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] From bwillius at gmx.de Tue Dec 6 09:48:59 2005 From: bwillius at gmx.de (Beatrix Willius) Date: Tue Dec 6 02:49:34 2005 Subject: Exporting to Text Message-ID: <8642.1133858939@www19.gmx.net> Ruslan Zasukhin wrote: > I wonder, do you see significant slow down comparing to Valentina's > built-in export ? Yes, I forgot to add this information. My code takes twice a long as the built-in export. Do you have another idea, how to give users feedback? The relatively small database (100 mb) I tried yesterday took over 2 minutes instead of 1. Regards Trixi Willius -- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner From sunshine at public.kherson.ua Tue Dec 6 12:05:04 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 04:06:35 2005 Subject: Exporting to Text In-Reply-To: <8642.1133858939@www19.gmx.net> Message-ID: On 12/6/05 10:48 AM, "Beatrix Willius" wrote: > Ruslan Zasukhin wrote: > >> I wonder, do you see significant slow down comparing to Valentina's >> built-in export ? > > Yes, I forgot to add this information. My code takes twice a long as the > built-in export. > > Do you have another idea, how to give users feedback? The relatively small > database (100 mb) I tried yesterday took over 2 minutes instead of 1. Another way can put it into separate thread. So your GUI will be alive. MAY BE even possible do smart trick, and show progress, using estimate of size of export file. You can check its size and show progress -- 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] From jda at his.com Tue Dec 6 07:58:22 2005 From: jda at his.com (jda) Date: Tue Dec 6 06:58:55 2005 Subject: Efficient use of text-containing field In-Reply-To: References: Message-ID: > > newfield = CreateVarCharField("newfield", 1022, EVFlag.fNullable + >> EVFlag.fIndexed + EVFlag.fIndexByWords) >> newfield.storageEncoding = "UTF16" >> newfieldSortMethod = CreateVarCharField("newfieldSortMethod", 16, >> EVFlag.fNullable, "left(newfield, 16)") >> >> >> Is the sort method the most efficient (space-saving) way to do this? >> Or should I be doing something else? I do not need to be able to sort >> by the entire possible 1022 characters... > >Yes this is the best way. > >You really need index on newfield also? >You should understand you will have 2 different indexes for field then. > Hi Ruslan, Hm, newfield is indexedByWordss so I can search for words in each field (as opposed to just search from beginning of the field). As for the sortmethod, this is unavoidable in Valentina if I need to sort by this field. I have suggested in the past that Valentina default to sort by entire field if the field is indexedbywords. That would mean I could get rid of about 30 sort methods! Jon From Ed at Kleban.com Tue Dec 6 07:58:21 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 6 07:58:57 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 2:06 AM, "Ruslan Zasukhin" wrote: > On 12/6/05 5:41 AM, "Ed Kleban" wrote: > >> Since you're using IndexedByWord, as you say, then to also do a sort then >> yes, you'll need to allocate some other field. > > Ed, with Valentina no need to make COPY of data. > > You can just create calculated field, which will on the fly calculate value. > And then Jon say: build index for this calculated field. > > So you get best case: > > one field which keep strings > > and 2 indexes around this field. > > Ah ha! Very cool. Good trick to know. I'll have to think some more about what could be done with calculated fields. I clearly haven't given them sufficient consideration. But since I'm almost always more concerned with speed over space they aren't inherently appealing since they "sound" expensive :) Thanks Ruslan. From sunshine at public.kherson.ua Tue Dec 6 16:06:36 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 08:07:08 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 2:58 PM, "jda" wrote: > As for the sortmethod, this is unavoidable in Valentina if I need to > sort by this field. I have suggested in the past that Valentina > default to sort by entire field if the field is indexedbywords. That > would mean I could get rid of about 30 sort methods! There is no way to sort BY INDEX which is by words. So choices will be A) do not indexed sorting. slowest can be acceptable only if you have small selection of records. and more overhead here B) ... Still have some index ... -- 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] From sunshine at public.kherson.ua Tue Dec 6 16:08:34 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 08:09:06 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 3:58 PM, "Ed Kleban" wrote: > Ah ha! Very cool. Good trick to know. I'll have to think some more about > what could be done with calculated fields. I clearly haven't given them > sufficient consideration. But since I'm almost always more concerned with > speed over space they aren't inherently appealing since they "sound" > expensive :) All depend on task. Exists 2 kinds of dbs. 1) dbs which need fast Add/Remove/Update 2) which need fast SEARCH. I think 80% of dbs are of kind 2. I.e. E.g. Users 100 times do search and one time modification. -- 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] From jda at his.com Tue Dec 6 10:02:44 2005 From: jda at his.com (jda) Date: Tue Dec 6 09:03:24 2005 Subject: Efficient use of text-containing field In-Reply-To: References: Message-ID: > > As for the sortmethod, this is unavoidable in Valentina if I need to >> sort by this field. I have suggested in the past that Valentina >> default to sort by entire field if the field is indexedbywords. That >> would mean I could get rid of about 30 sort methods! > >There is no way to sort BY INDEX which is by words. > >So choices will be > >A) do not indexed sorting. slowest > can be acceptable only if you have small selection of records. > and more overhead here > >B) ... Still have some index ... > I'm sorry, but I want to make sure I understand. Can I do a non-method sort on fields that are indexedByWords? My understanding is that this is not possible (at ANY speed). That is why I use a sort method. If it *is* possible to sort an indexedByWords field (again, speed is not an issue for me), please tell me how. Thanks, Jon From sunshine at public.kherson.ua Tue Dec 6 18:17:02 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 6 10:17:34 2005 Subject: Efficient use of text-containing field In-Reply-To: Message-ID: On 12/6/05 5:02 PM, "jda" wrote: >>> As for the sortmethod, this is unavoidable in Valentina if I need to >>> sort by this field. I have suggested in the past that Valentina >>> default to sort by entire field if the field is indexedbywords. That >>> would mean I could get rid of about 30 sort methods! >> >> There is no way to sort BY INDEX which is by words. >> >> So choices will be >> >> A) do not indexed sorting. slowest >> can be acceptable only if you have small selection of records. >> and more overhead here >> >> B) ... Still have some index ... >> > > I'm sorry, but I want to make sure I understand. > > Can I do a non-method sort on fields that are indexedByWords? NO. > My understanding is that this is not possible (at ANY speed). right > That is why I use a sort method. right > If it *is* possible to sort an indexedByWords field (again, speed is not an > issue for me), please tell me how. No way currently. I have talk about future feature You sure you will not complain later? :-) -- 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] From jda at his.com Tue Dec 6 11:27:36 2005 From: jda at his.com (jda) Date: Tue Dec 6 10:28:14 2005 Subject: Efficient use of text-containing field In-Reply-To: References: Message-ID: >I have talk about future feature >You sure you will not complain later? :-) > Ah, I see. OK, I'll wait. I never complain, Ruslan, I just point out problems! :-) I would love it if we could sort fields that are indexedByWords... Jon From ohmitou at wanadoo.fr Wed Dec 7 10:38:17 2005 From: ohmitou at wanadoo.fr (Thierry Nauze) Date: Wed Dec 7 00:39:10 2005 Subject: How To optimize a database ? Message-ID: Hello, I have a DBbase with several tables from which one is more often requested than the others Main table t1: id A B C ... And here is a secondary table t2 : id t1_id D E To obtain data A, B and D knowing t1.id, I need two requests SQL. I have to try to optimize situation by modifying the structure of the base AFTER the modification, I have main Table t1 id A B C D ... A single request is then necessary with a more simple code... And ... result is contrary to my expectations ! Where is the problem ? Question: is it preferable to have several tables with few columns or a single table with many columns? That is not maybe impossible! Regards, -- Thierry NAUZE Saint-Denis de la R?union From IvanSmahin at public.kherson.ua Wed Dec 7 09:43:49 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Wed Dec 7 01:44:37 2005 Subject: How To optimize a database ? In-Reply-To: References: Message-ID: <10010346356.20051207094349@public.kherson.ua> Hello Thierry, Wednesday, December 7, 2005, 8:38:17 AM, you wrote: TN> Question: is it preferable to have several tables with few columns or TN> a single table with many columns? TN> That is not maybe impossible! There is no particular answer. Both issues could be used - depends on your task. If you perform joins very often, probably, you prefer to make some denormalization. (All data in the single table.) (But note - you could get some duplicated rows - for each D values.) On the other hand, the nature of some databases is to store data as row - field by field. So it could be significant slow down reading/writing such a denormalized table. I would say - there is some limit exists. If you have only few columns in the second table and it is linked as 1::1 to the first - you'd better make a single table. BTW, you need some good book described this stuff: Normalizing, normal forms and so on... -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From ohmitou at wanadoo.fr Wed Dec 7 11:56:38 2005 From: ohmitou at wanadoo.fr (Thierry Nauze) Date: Wed Dec 7 01:57:18 2005 Subject: How To optimize a database ? In-Reply-To: <10010346356.20051207094349@public.kherson.ua> References: <10010346356.20051207094349@public.kherson.ua> Message-ID: <78E6B275-FEAC-4A10-B4D5-9AD7C16E5A90@wanadoo.fr> Thanks Ivan, Le 7 d?c. 05 ? 11:43, Ivan Smahin a ?crit : > BTW, you need some good book described this stuff: > Normalizing, normal forms and so on... I am reading ;o) Regards, -- Thierry NAUZE Saint-Denis de la R?union From sunshine at public.kherson.ua Wed Dec 7 11:50:59 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 7 03:51:39 2005 Subject: How To optimize a database ? In-Reply-To: Message-ID: On 12/7/05 8:38 AM, "Thierry Nauze" wrote: Hi Thierry, > Hello, > > I have a DBbase with several tables from which one is more often > requested than the others > > Main table t1: > id A B C ... > > And here is a secondary table t2 : > id t1_id D E > > To obtain data A, B and D knowing t1.id, I need two requests SQL. Why not by single with join ? > I have to try to optimize situation by modifying the structure of the > base > > AFTER the modification, I have main Table t1 > id A B C D ... > > A single request is then necessary with a more simple code... > > > And ... result is contrary to my expectations ! Where is the problem ? You mean you get it slower? What exactly operation become slow ? Some operations have become faster? Do you use Db.Select() and Cursor ? > Question: is it preferable to have several tables with few columns or > a single table with many columns? > That is not maybe impossible! -- 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] From Ed at Kleban.com Wed Dec 7 23:41:00 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 7 23:41:43 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 11/28/05 5:59 AM, "Ruslan Zasukhin" wrote: > On 11/28/05 3:57 AM, "Ed Kleban" wrote: > >>> Actually in v2 for UTF8 the best size of VarChar will be 2044. >>> >> >> Why? Does this have to do with the natural page size of MacOS X or >> something? > > Yes. Best size of page is 4K > > We assume that page should keep at least 2 records. > > So max size *in bytes* for one record is (4K - header) / 2 = 2044 > Ok,... but If I recall correctly, UTF8 does not work yet in V4RB 2.xx correct? Is this true? What bad things happen if I set db.StorageEncoding = UTF-8 (whatever the correct syntax for that is)? If I must use UTF16 as my StorageEncoding, however I plan to use just simple ASCII 8-bit character strings in RB, then presumably I should declare my VarChar fields as VarChar( 1022 ) even though the test I am using in RB to determine if a string will fit is "LenB( aString ) <= 2044" Is this correct? Will Valentina be able to store strings in UTF-8 in the future? Thanks! --Ed From Ed at Kleban.com Wed Dec 7 23:56:42 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 7 23:57:25 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/7/05 11:41 PM, "Ed Kleban" wrote: > > > > On 11/28/05 5:59 AM, "Ruslan Zasukhin" wrote: > >> On 11/28/05 3:57 AM, "Ed Kleban" wrote: >> >>>> Actually in v2 for UTF8 the best size of VarChar will be 2044. >>>> >>> >>> Why? Does this have to do with the natural page size of MacOS X or >>> something? >> >> Yes. Best size of page is 4K >> >> We assume that page should keep at least 2 records. >> >> So max size *in bytes* for one record is (4K - header) / 2 = 2044 >> > > Ok,... but If I recall correctly, UTF8 does not work yet in V4RB 2.xx > correct? > > Is this true? What bad things happen if I set db.StorageEncoding = UTF-8 > (whatever the correct syntax for that is)? > > If I must use UTF16 as my StorageEncoding, however I plan to use just simple > ASCII 8-bit character strings in RB, then presumably I should declare my > VarChar fields as VarChar( 1022 ) even though the test I am using in RB to > determine if a string will fit is "LenB( aString ) <= 2044" > > Is this correct? > > Will Valentina be able to store strings in UTF-8 in the future? > > Thanks! > --Ed Actually, I think I got that backwards. Also if the size *in bytes* for one record is 2044, and 4 bytes of the record are required for string size, then I guess I should declare: VarChar( 2020 ) and do a check in RB for: "LenB( aString ) <= 1010" Correct? From Ed at Kleban.com Thu Dec 8 00:03:02 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 8 00:03:41 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/7/05 11:56 PM, "Ed Kleban" wrote: > > > > On 12/7/05 11:41 PM, "Ed Kleban" wrote: > >> >> >> >> On 11/28/05 5:59 AM, "Ruslan Zasukhin" wrote: >> >>> On 11/28/05 3:57 AM, "Ed Kleban" wrote: >>> >>>>> Actually in v2 for UTF8 the best size of VarChar will be 2044. >>>>> >>>> >>>> Why? Does this have to do with the natural page size of MacOS X or >>>> something? >>> >>> Yes. Best size of page is 4K >>> >>> We assume that page should keep at least 2 records. >>> >>> So max size *in bytes* for one record is (4K - header) / 2 = 2044 >>> >> >> Ok,... but If I recall correctly, UTF8 does not work yet in V4RB 2.xx >> correct? >> >> Is this true? What bad things happen if I set db.StorageEncoding = UTF-8 >> (whatever the correct syntax for that is)? >> >> If I must use UTF16 as my StorageEncoding, however I plan to use just simple >> ASCII 8-bit character strings in RB, then presumably I should declare my >> VarChar fields as VarChar( 1022 ) even though the test I am using in RB to >> determine if a string will fit is "LenB( aString ) <= 2044" >> >> Is this correct? >> >> Will Valentina be able to store strings in UTF-8 in the future? >> >> Thanks! >> --Ed > > Actually, I think I got that backwards. Also if the size *in bytes* for one > record is 2044, and 4 bytes of the record are required for string size, then I > guess I should declare: > VarChar( 2020 ) > and do a check in RB for: > "LenB( aString ) <= 1010" > Correct? > Doh! I got it wrong again. I'm really tired. Ok, one last time: 4096 - (8 + 4 + 4 ) = 4096 - 16 = 4080 Therefore the field declaration should be: VarChar( 2040 ) And the RB test should be: LenB( aString ) <= 1020 Correct? That's it. I'm going to bed. Nite! --Ed From sunshine at public.kherson.ua Thu Dec 8 10:57:01 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 8 02:57:44 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/8/05 7:41 AM, "Ed Kleban" wrote: >>>> Actually in v2 for UTF8 the best size of VarChar will be 2044. >>>> >>> >>> Why? Does this have to do with the natural page size of MacOS X or >>> something? >> >> Yes. Best size of page is 4K >> >> We assume that page should keep at least 2 records. >> >> So max size *in bytes* for one record is (4K - header) / 2 = 2044 >> > > Ok,... but If I recall correctly, UTF8 does not work yet in V4RB 2.xx > correct? right > Is this true? What bad things happen if I set db.StorageEncoding = UTF-8 > (whatever the correct syntax for that is)? crashes > If I must use UTF16 as my StorageEncoding, however I plan to use just simple > ASCII 8-bit character strings in RB, then presumably I should declare my > VarChar fields as VarChar( 1022 ) even though the test I am using in RB to > determine if a string will fit is "LenB( aString ) <= 2044" > Is this correct? Not exactly > Will Valentina be able to store strings in UTF-8 in the future? Yes. For field with single byte encoding, you will be able use VarChar[2044]. You know, may be you can TRY to mark some field as fld.StorageEncoding = "MacRoman" or "Latin1" I am not sure if supported "ASCII" May be such encoding will work. With UTF8 is problem that it have non-predicated lengths in bytes for different languages. -- 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] From Ed at Kleban.com Thu Dec 8 08:21:08 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 8 08:21:48 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/8/05 2:57 AM, "Ruslan Zasukhin" wrote: > On 12/8/05 7:41 AM, "Ed Kleban" wrote: > > For field with single byte encoding, you will be able use VarChar[2044]. Ok, let's do the math one more time. I suspect the number 2044 may be wrong. We have a 4096 byte page less (8-byte page header) less (4 byte string-length-header for each of 2 strings) = 4096 - 8 - (4 * 2) = 4096 - 16 = 4080 bytes for storage of actual string data, or 4080 / 2 = 2040 maximum storage bytes for each of two strings which in UTF-16 with two bytes per string = max 1020 characters per string. Correct? Or did I get it wrong? > You know, may be you can TRY to mark some field as > fld.StorageEncoding = "MacRoman" or "Latin1" > Do you mean to say that if I TRY this by marking a field as MacRoman or Latin1 and it does not crash, then I may be able to store 8-bit character strings in V2? > I am not sure if supported "ASCII" > > May be such encoding will work. With UTF8 is problem that it have > non-predicated lengths in bytes for different languages. > From sunshine at public.kherson.ua Thu Dec 8 17:21:42 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 8 09:22:25 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/8/05 4:21 PM, "Ed Kleban" wrote: >> You know, may be you can TRY to mark some field as > >> fld.StorageEncoding = "MacRoman" or "Latin1" >> > > Do you mean to say that if I TRY this by marking a field as MacRoman or > Latin1 and it does not crash, then I may be able to store 8-bit character > strings in V2? yes -- 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] From sunshine at public.kherson.ua Thu Dec 8 17:27:11 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 8 09:27:54 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/8/05 4:21 PM, "Ed Kleban" wrote: >> For field with single byte encoding, you will be able use VarChar[2044]. > > Ok, let's do the math one more time. I suspect the number 2044 may be > wrong. > > We have a 4096 byte page less (8-byte page header) less (4 byte > string-length-header for each of 2 strings) > = 4096 - 8 - (4 * 2) = 4096 - 16 > = 4080 bytes for storage of actual string data, > or 4080 / 2 = 2040 maximum storage bytes for each of two strings > which in UTF-16 with two bytes per string > = max 1020 characters per string. > > Correct? Or did I get it wrong? Something wrong. Aha, I think you use info from 1.x docs. In v2 VarChar page do not have header at all. So 4096 - (4+4) = 4088. 4088 / 2 = 2044. 2044 / 2 = 1022. -- 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] From Ed at Kleban.com Thu Dec 8 09:42:47 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 8 09:43:27 2005 Subject: Default maximal length for VarChar Re: VChar vs VText In-Reply-To: Message-ID: On 12/8/05 9:27 AM, "Ruslan Zasukhin" wrote: > On 12/8/05 4:21 PM, "Ed Kleban" wrote: > >>> For field with single byte encoding, you will be able use VarChar[2044]. >> >> Ok, let's do the math one more time. I suspect the number 2044 may be >> wrong. >> >> We have a 4096 byte page less (8-byte page header) less (4 byte >> string-length-header for each of 2 strings) >> = 4096 - 8 - (4 * 2) = 4096 - 16 >> = 4080 bytes for storage of actual string data, >> or 4080 / 2 = 2040 maximum storage bytes for each of two strings >> which in UTF-16 with two bytes per string >> = max 1020 characters per string. >> >> Correct? Or did I get it wrong? > > Something wrong. > > Aha, I think you use info from 1.x docs. > > In v2 VarChar page do not have header at all. > So > > 4096 - (4+4) = 4088. > > 4088 / 2 = 2044. > > 2044 / 2 = 1022. > Grrrr. This info came out of V2Kernel.pdf -- right after the part where it tells me pages are 1024 bytes in length. You need to get those docs updated Ruslan. Ok, thanks! --Ed From maxprog at mac.com Thu Dec 8 18:34:15 2005 From: maxprog at mac.com (Stan Busk) Date: Thu Dec 8 11:35:01 2005 Subject: [V4RB] Query returning unmatched records ( DATE BETWEEN xxx AND yyy ) In-Reply-To: <761100794.20051130165106@public.kherson.ua> References: <9A14FBE3-C290-4991-94A9-C8FB7BEB8733@mac.com> <1462311288.20051130162942@public.kherson.ua> <7154A734-C5EC-41EA-B136-7C7E02976410@mac.com> <761100794.20051130165106@public.kherson.ua> Message-ID: Hi, Yes, this is true, I read this in SQL92 doc as well but seems it doesn't work with Valentina. This: fldDate BETWEEN 'MM/DD/YYYY' AND 'MM/DD/YYYY' returns the right record number. This: fldDate BETWEEN DATE 'MM/DD/YYYY' AND DATE 'MM/DD/YYYY' never returns records. Never raises an exception either. Stan > Hello Stan, > > Wednesday, November 30, 2005, 4:39:33 PM, you wrote: > > SB> Interesting, I searched the web on how do to that, so: > > SB> WHERE ( myDate BETWEEN date'1/1/2001' AND date'1/31/2001' ) > > SB> is correct? If so I will try it. myDate is a DateTime field. > > SB> Stan > > You still should use the dates as defined by current dateFormat. > Date/DateTime/Time literals just gives a way to remove some > internal ambiguities. > > BTW. Using such literals is required by SQL-92. > > > -- > Best regards, > Ivan mailto:IvanSmahin@public.kherson.ua > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From IvanSmahin at public.kherson.ua Thu Dec 8 20:10:52 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Thu Dec 8 12:11:28 2005 Subject: [V4RB] Query returning unmatched records ( DATE BETWEEN xxx AND yyy ) In-Reply-To: References: <9A14FBE3-C290-4991-94A9-C8FB7BEB8733@mac.com> <1462311288.20051130162942@public.kherson.ua> <7154A734-C5EC-41EA-B136-7C7E02976410@mac.com> <761100794.20051130165106@public.kherson.ua> Message-ID: <1552023022.20051208201052@public.kherson.ua> Hello Stan, Thursday, December 8, 2005, 7:34:15 PM, you wrote: SB> Hi, SB> Yes, this is true, I read this in SQL92 doc as well but seems it SB> doesn't work with Valentina. SB> This: SB> fldDate BETWEEN 'MM/DD/YYYY' AND 'MM/DD/YYYY' SB> returns the right record number. SB> This: SB> fldDate BETWEEN DATE 'MM/DD/YYYY' AND DATE 'MM/DD/YYYY' SB> never returns records. Never raises an exception either. I will check it ASAP. Could you please report it on Mantis? -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From jda at his.com Thu Dec 8 19:30:51 2005 From: jda at his.com (jda) Date: Thu Dec 8 18:31:30 2005 Subject: Integrating three tables In-Reply-To: References: Message-ID: Hi all, I've been playing with changing my db from a rigid one-table structure to a more flexible one, at Ruslan's urging. I'm running into some conceptual/semantic difficulties because of my ignorance, and don't want to badger Ruslan too much. So I thought I'd badger the list. :-) I want to add more fields to an existing database. Two new tables, one containing a pointer to the records in the first table, the new data in a varcharfield, and a pointer to a table holding the field names. The other table contains the names of the new fields. The new structure is basically this: Table A The original db, with lots of columns Table B -- morefields, 3 columns refPtr = CreateObjectPtrField("refPtr", inMyDB.Table("tableA"), EVOnDelete.kCascade, EVFlag.fNone) moreFieldContent = CreateVarCharField("moreFieldContent", 1022, EVFlag.fNullable + EVFlag.fIndexed + EVFlag.fIndexByWords) labelPtr = CreateObjectPtrField("labelPtr", inMyDB.Table("labels"), EVOnDelete.kCascade, EVFlag.fNone Table C -- labels, 1 column labelName = CreateVarCharField("labelName", 1022, EVFlag.fNullable) So my first question is, how to store data in a field in the table Table B in such a way that it is linked to Table A and Table C? Right now I'm using a simple cursor to do this in one of the fields in Table A: myCursor = myDataBase.SQLselect("SELECT " + fldName + " from theTableA WHERE id=" + str(refNum) EVCursorLocation.kServerSide, EVLockType.kReadWrite) and then using myCursor.setString (the value id is a column in Table A used to track records). Any replies (the simpler the better) much appreciated. Thanks, Jon From sunshine at public.kherson.ua Fri Dec 9 10:29:11 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 9 02:29:59 2005 Subject: Integrating three tables In-Reply-To: Message-ID: On 12/9/05 2:30 AM, "jda" wrote: Hi Jon, > The new structure is basically this: > > Table A > The original db, with lots of columns > > Table B -- morefields, 3 columns > > refPtr = CreateObjectPtrField("refPtr", inMyDB.Table("tableA"), > EVOnDelete.kCascade, EVFlag.fNone) > moreFieldContent = CreateVarCharField("moreFieldContent", 1022, > EVFlag.fNullable + EVFlag.fIndexed + EVFlag.fIndexByWords) > labelPtr = CreateObjectPtrField("labelPtr", inMyDB.Table("labels"), > EVOnDelete.kCascade, EVFlag.fNone > > > Table C -- labels, 1 column > labelName = CreateVarCharField("labelName", 1022, EVFlag.fNullable) > > So my first question is, how to store data in a field in the table > Table B in such a way that it is linked to Table A and Table C? Right > now I'm using a simple cursor to do this in one of the fields in > Table A: > > myCursor = myDataBase.SQLselect("SELECT " + fldName + " from > theTableA WHERE id=" + str(refNum) EVCursorLocation.kServerSide, > EVLockType.kReadWrite) > > and then using myCursor.setString (the value id is a column in Table > A used to track records). When you have 3 tables you can add records independently. In the same time you can note, that in your task AT first must be added records to TableA and TableC, Only after this you can add record into TableB using RecIDs of above 2. * Let you have in TableA record with RecID = 11. you have added it as usually * Let you have add into TableC new record with recID = 1. * Now to add record into TableB which links to both you can do simply query = "INSERT INTO TableB (refPtr, MoreFieldContents, lablePtr) VALUES( 11, 'something', 1 )" db.SqlExecute( query ) -- 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] From IvanSmahin at public.kherson.ua Fri Dec 9 16:18:47 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Fri Dec 9 08:19:22 2005 Subject: [V4RB] Query returning unmatched records ( DATE BETWEEN xxx AND yyy ) In-Reply-To: References: <9A14FBE3-C290-4991-94A9-C8FB7BEB8733@mac.com> <1462311288.20051130162942@public.kherson.ua> <7154A734-C5EC-41EA-B136-7C7E02976410@mac.com> <761100794.20051130165106@public.kherson.ua> Message-ID: <1215950016.20051209161847@public.kherson.ua> Hello Stan, Thursday, December 8, 2005, 7:34:15 PM, you wrote: SB> Hi, SB> Yes, this is true, I read this in SQL92 doc as well but seems it SB> doesn't work with Valentina. SB> This: SB> fldDate BETWEEN 'MM/DD/YYYY' AND 'MM/DD/YYYY' SB> returns the right record number. SB> This: SB> fldDate BETWEEN DATE 'MM/DD/YYYY' AND DATE 'MM/DD/YYYY' SB> never returns records. Never raises an exception either. SB> Stan >> SB> Interesting, I searched the web on how do to that, so: >> >> SB> WHERE ( myDate BETWEEN date'1/1/2001' AND date'1/31/2001' ) >> >> SB> is correct? If so I will try it. myDate is a DateTime field. >> I'm sorry I have missed that you operate with DateTime field. So you should use DateTime literals. WHERE ( myDate BETWEEN datetime'1/1/2001' AND datetime'1/31/2001' ) -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From jda at his.com Fri Dec 9 12:09:38 2005 From: jda at his.com (jda) Date: Fri Dec 9 11:10:26 2005 Subject: Integrating three tables In-Reply-To: References: Message-ID: > > query = "INSERT INTO TableB (refPtr, MoreFieldContents, lablePtr) > VALUES( 11, 'something', 1 )" > > db.SqlExecute( query ) > > Hi Ruslan, That works, great! Next question: how to I find out if the field already exists so I UPDATE instead of INSERT? Right now I have a cursor with the record from the main table (Table A), from which I get the RecID. How to query the table "morefields" (Table B) to see if an entry exists that is linked to a record in Table A and a LabelPtr in Table C? Is there an API (table)-based way, or is SQL better? Thanks, Jon From sunshine at public.kherson.ua Fri Dec 9 19:26:00 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 9 11:26:46 2005 Subject: Integrating three tables In-Reply-To: Message-ID: On 12/9/05 7:09 PM, "jda" wrote: >> query = "INSERT INTO TableB (refPtr, MoreFieldContents, lablePtr) >> VALUES( 11, 'something', 1 )" >> >> db.SqlExecute( query ) >> >> > > Hi Ruslan, > > That works, great! Next question: how to I find out if the field > already exists so I UPDATE instead of INSERT? > Right now I have a cursor with the record from the main table (Table > A), from which I get the RecID. How to query the table "morefields" > (Table B) to see if an entry exists that is linked to a record in > Table A and a LabelPtr in Table C? Is there an API (table)-based way, > or is SQL better? SQL or API -- up to your choice. SQL: SELECT recID FROM MoreFields WHERE refPtr = 11 AND LablePtr = 1 API: if( boFields.RefPtr.Exists(11) AND boFields.LablePtr.Exists(1) ) -- 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] From maxprog at mac.com Fri Dec 9 20:18:30 2005 From: maxprog at mac.com (Stan Busk) Date: Fri Dec 9 13:19:14 2005 Subject: [V4RB] Query returning unmatched records ( DATE BETWEEN xxx AND yyy ) In-Reply-To: <1215950016.20051209161847@public.kherson.ua> References: <9A14FBE3-C290-4991-94A9-C8FB7BEB8733@mac.com> <1462311288.20051130162942@public.kherson.ua> <7154A734-C5EC-41EA-B136-7C7E02976410@mac.com> <761100794.20051130165106@public.kherson.ua> <1215950016.20051209161847@public.kherson.ua> Message-ID: <25739193-F2B1-47B6-B526-B7D0FA78608E@mac.com> Hi, Yes, WHERE ( myDate BETWEEN datetime'1/1/2001' AND datetime'1/31/2001' ) works fine! Thanks, Stan > Hello Stan, > > Thursday, December 8, 2005, 7:34:15 PM, you wrote: > > SB> Hi, > > SB> Yes, this is true, I read this in SQL92 doc as well but seems it > SB> doesn't work with Valentina. > > SB> This: > SB> fldDate BETWEEN 'MM/DD/YYYY' AND 'MM/DD/YYYY' > SB> returns the right record number. > > SB> This: > SB> fldDate BETWEEN DATE 'MM/DD/YYYY' AND DATE 'MM/DD/YYYY' > SB> never returns records. Never raises an exception either. > > SB> Stan > >>> SB> Interesting, I searched the web on how do to that, so: >>> >>> SB> WHERE ( myDate BETWEEN date'1/1/2001' AND date'1/31/2001' ) >>> >>> SB> is correct? If so I will try it. myDate is a DateTime field. >>> > > I'm sorry I have missed that you operate with DateTime field. > So you should use DateTime literals. > > WHERE ( myDate BETWEEN datetime'1/1/2001' AND datetime'1/31/2001' ) > > -- > Best regards, > Ivan mailto:IvanSmahin@public.kherson.ua > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From trash at technart.net Fri Dec 9 20:27:36 2005 From: trash at technart.net (jacques perconte) Date: Fri Dec 9 13:28:04 2005 Subject: SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and length(myFieldName) = 2 In-Reply-To: Message-ID: <20051209192712.DE2996400AC@leretour.medias-cite.org> Hi all, is it possible to use the length function in an where clause like this: SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and length(myFieldName) = 2 In case of not, is there some other possibility to check the length of an field in a where clause? Thanks for your help Jacques From sunshine at public.kherson.ua Fri Dec 9 23:34:58 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 9 15:35:44 2005 Subject: [V4RB] Query returning unmatched records ( DATE BETWEEN xxx AND yyy ) In-Reply-To: <25739193-F2B1-47B6-B526-B7D0FA78608E@mac.com> Message-ID: On 12/9/05 9:18 PM, "Stan Busk" wrote: > Hi, > > Yes, WHERE ( myDate BETWEEN datetime' Ivan, One point although. Stan have told that DATE '....' Did not report errors and did not works. This should not happens. At least error should be reported. Right? -- 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] From sunshine at public.kherson.ua Fri Dec 9 23:36:19 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 9 15:37:04 2005 Subject: SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and length(myFieldName) = 2 In-Reply-To: <20051209192712.DE2996400AC@leretour.medias-cite.org> Message-ID: On 12/9/05 9:27 PM, "jacques perconte" wrote: Hi Jacques, > Hi all, > is it possible to use the length function in an where clause like this: > > SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and > length(myFieldName) = 2 > > In case of not, is there some other possibility to check the length of an > field in a where clause? If you use Valentina 2.x then YES -- 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] From trash at technart.net Fri Dec 9 22:43:18 2005 From: trash at technart.net (jacques perconte) Date: Fri Dec 9 15:43:55 2005 Subject: SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and length(myFieldName) = 2 In-Reply-To: Message-ID: <20051209214254.35A57640053@leretour.medias-cite.org> ..... SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and . > length(myFieldName) = 2 . > . > In case of not, is there some other possibility to check the length of . an . > field in a where clause? . . If you use Valentina 2.x then YES Thanks for your answer but in fact i'm still using valentina 1.x so that means it's not possible? Is there many changes to do to upgrade a 1.x project to a 2.x ? Or can I find a solution with the 1.x ? From sunshine at public.kherson.ua Sat Dec 10 00:47:41 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 9 16:48:29 2005 Subject: SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and length(myFieldName) = 2 In-Reply-To: <20051209214254.35A57640053@leretour.medias-cite.org> Message-ID: On 12/9/05 11:43 PM, "jacques perconte" wrote: > ..... SELECT * FROM myTable WHERE myFieldName LIKE 'integer' and > . > length(myFieldName) = 2 > . > > . > In case of not, is there some other possibility to check the length of > . an > . > field in a where clause? > . > . If you use Valentina 2.x then YES > > Thanks for your answer but in fact i'm still using valentina 1.x so that > means it's not possible? Then you can use BaseObject Methods (aka Calculated fields) > Is there many changes to do to upgrade a 1.x project to a 2.x ? What you mean? Yes it is possible upgrade to 2.x > Or can I find a solution with the 1.x ? workaround -- 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] From jda at his.com Fri Dec 9 19:16:24 2005 From: jda at his.com (jda) Date: Fri Dec 9 18:17:12 2005 Subject: Integrating three tables In-Reply-To: References: Message-ID: >API: > > if( boFields.RefPtr.Exists(11) AND > boFields.LablePtr.Exists(1) ) > > Hi Ruslan, I didn't find .Exists, but I did find .RecordExists. However, I don't have it quite right. This is not correct syntax: myDatabase.myMoreFields.refPtr(11).RecordExists What is the correct way to state this? Thanks, Jon From sunshine at public.kherson.ua Sat Dec 10 12:16:31 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 10 04:17:21 2005 Subject: Integrating three tables In-Reply-To: Message-ID: On 12/10/05 2:16 AM, "jda" wrote: >> API: >> >> if( boFields.RefPtr.Exists(11) AND >> boFields.LablePtr.Exists(1) ) >> >> > > Hi Ruslan, > > I didn't find .Exists, but I did find .RecordExists. Aha, I have mean Vfield.ValueExists() method. > However, I don't have it quite right. This is not correct syntax: > > myDatabase.myMoreFields.refPtr(11).RecordExists > > What is the correct way to state this? if( boFields.RefPtr.ValueExists(11) AND boFields.LablePtr.ValueExists(1) ) -- 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] From jda at his.com Sat Dec 10 09:56:26 2005 From: jda at his.com (jda) Date: Sat Dec 10 08:57:07 2005 Subject: Integrating three tables In-Reply-To: References: Message-ID: > > I didn't find .Exists, but I did find .RecordExists. > >Aha, I have mean Vfield.ValueExists() method. > Hi Ruslan, Thanks again, this works well. Next issue: I need the RecID to create the links. But when I import a new record via a cursor (addRecord), the recID is not updated. In other words myDatabase.LastInsertedRecID returns NOT the new recID, but the one before it. I could just use myDatabase.LastInsertedRecID except this applies to the database, not the table I'm adding to. If the last inserted RecID is for another table, this value will be wrong. What I think I need is myDatabase.myTable.LastInsertedRecID but that isn't available. How to unambiguously get the id of the next record to be added? Jon From sunshine at public.kherson.ua Sat Dec 10 17:30:40 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 10 09:31:28 2005 Subject: Integrating three tables In-Reply-To: Message-ID: On 12/10/05 4:56 PM, "jda" wrote: > Next issue: > > I need the RecID to create the links. But when I import a new record > via a cursor (addRecord), the recID is not updated. In other words > > myDatabase.LastInsertedRecID > > returns NOT the new recID, but the one before it. > > I could just use > > myDatabase.LastInsertedRecID > > except this applies to the database, not the table I'm adding to. If > the last inserted RecID is for another table, this value will be > wrong. What I think I need is > > myDatabase.myTable.LastInsertedRecID No. Yo do not need it. myDatabase.LastInsertedRecID returns RecID of ANY just only inserted record. Never mind what table. > but that isn't available. > How to unambiguously get the id of the next record to be added? In any case this should work best of all: NewRecID = curs1.AddRecord() // add record into T1 -- 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] From Ed at Kleban.com Sat Dec 10 20:45:05 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sat Dec 10 20:45:35 2005 Subject: Default sort order In-Reply-To: Message-ID: On 12/10/05 7:26 PM, "Ed Kleban" wrote: > > Ok, then how about this: If I have a M:M binary link (I think I've finally > found a use for one) and I execute: > > FindLinked( inRecId, inTableA, inTableB ) > > Then is there a guaranteed order for the members of the resulting VArraySet? > > Do occur in inTabeA.recId order? Or in inTableB.recID order? > > If the relationship is recursive: > > FindLinked( inRecId, inTableA, inTableA, inRecursionDirection ) > > what will the order be in this case? Is it dependent up on the value of > inRecursionDirection? > Hmm, let me present you with a practical example for what I am trying to accomplish: I have a table named TItems containing 9 items named (with a string field) in recId order: I1, I2, I3, ... I8, I9. There is a recursive M:M parent/child relationship on this table that I would like to represent using a Binary Link. Specifically, here are a couple of the family relationships: I1 is parent of children: ( I4, I5, I6 ) I2 is parent of children: ( I6, I4, I7 ) But the order of the children is important and must be preserved! So I enter the following links: LinkRecords( { 1, 4 } ) LinkRecords( { 1, 5 } ) LinkRecords( { 1, 6 } ) LinkRecords( { 2, 6 } ) LinkRecords( { 2, 4 } ) LinkRecords( { 2, 7 } ) Now then, Is there a call I can make that will return me an ArraySet with the children of I2 necessarily in the order that these relationships were defined? How about: anArraySet = aVLink.FindLinked( 2, TItems, Titems, kFromParentToChild ) Will this necessarily return anArraySet = { 6, 4, 7 }? Or can I not assume the order of the elements in the returned anArraySet ? From Ed at Kleban.com Sat Dec 10 23:30:07 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sat Dec 10 23:30:36 2005 Subject: Default sort order In-Reply-To: Message-ID: On 12/10/05 8:45 PM, "Ed Kleban" wrote: > > On 12/10/05 7:26 PM, "Ed Kleban" wrote: > > So I enter the following links: > LinkRecords( { 1, 4 } ) > LinkRecords( { 1, 5 } ) > LinkRecords( { 1, 6 } ) > LinkRecords( { 2, 6 } ) > LinkRecords( { 2, 4 } ) > LinkRecords( { 2, 7 } ) > > Now then, Is there a call I can make that will return me an ArraySet with > the children of I2 necessarily in the order that these relationships were > defined? > > How about: > > anArraySet = aVLink.FindLinked( 2, TItems, Titems, kFromParentToChild ) > > Will this necessarily return anArraySet = { 6, 4, 7 }? > > Or can I not assume the order of the elements in the returned anArraySet ? > Woops! Since this is a M:M link, does "kFromParentToChild" have any meaning here? How do I signify I want recId's for right links rather than left links for recId = 2 ? From sunshine at public.kherson.ua Sun Dec 11 11:24:10 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 03:24:53 2005 Subject: Default sort order In-Reply-To: Message-ID: On 12/11/05 3:26 AM, "Ed Kleban" wrote: Hi Ed, > Ok, then how about this: If I have a M:M binary link (I think I've finally > found a use for one) and I execute: > > FindLinked( inRecId, inTableA, inTableB ) > > Then is there a guaranteed order for the members of the resulting VArraySet? Yes, because BinaryLink keep them sorted. > Do occur in inTabeA.recId order? Or in inTableB.recID order? Above method returns set for table B > If the relationship is recursive: > > FindLinked( inRecId, inTableA, inTableA, inRecursionDirection ) > > what will the order be in this case? Is it dependent up on the value of > inRecursionDirection? Yes depend. But in both case-sensitive you get ordered set of record for tableA, Last parameter change found records. -- 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] From sunshine at public.kherson.ua Sun Dec 11 11:34:54 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 03:35:30 2005 Subject: Default sort order In-Reply-To: Message-ID: On 12/11/05 7:30 AM, "Ed Kleban" wrote: Hi Ed, >> So I enter the following links: >> LinkRecords( { 1, 4 } ) >> LinkRecords( { 1, 5 } ) >> LinkRecords( { 1, 6 } ) >> LinkRecords( { 2, 6 } ) >> LinkRecords( { 2, 4 } ) >> LinkRecords( { 2, 7 } ) >> >> Now then, Is there a call I can make that will return me an ArraySet with >> the children of I2 necessarily in the order that these relationships were >> defined? >> >> How about: >> >> anArraySet = aVLink.FindLinked( 2, TItems, Titems, kFromParentToChild ) >> >> Will this necessarily return anArraySet = { 6, 4, 7 }? >> >> Or can I not assume the order of the elements in the returned anArraySet ? >> > > Woops! Since this is a M:M link, does "kFromParentToChild" have any meaning > here? > How do I signify I want recId's for right links rather than left > links for recId = 2 ? Yes still have I like this example: Table Person with recursive link HaveBorn So we have here in fact link 2 : M which still is M : M. Right? Now let we take Person with RecId = 1024, Let this will be Ruslan. res = Born.FindLinked( 1024, Person, Person, ???? ) So whom you want find? A) Children of Ruslan: childs = Born.FindLinked( 1024, Person, Person, kFromPArentToChilds) b) Children of Ruslan: parents = Born.FindLinked( 1024, Person, Person, kFromChildsToParent) -- 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] From Ed at Kleban.com Sun Dec 11 07:30:25 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 07:30:55 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 11/14/05 3:38 PM, "Ruslan Zasukhin" wrote: >>> RUSLAN: >>> P.S. Hmm... May be in fact we can make MORE functions to make things more >>> clean... >>> >>> FindLinked( recid, T1, T2 ) >>> FindLinkedRecursive( recid, T, inRecursionDirection ) Ed: No! Bad idea. >> ED: >> An interesting idea, but sheds [no] light on the question I have. > RUSLAN: > Hmm, or even better idea! > It looks more natural as > > set = TableA.FindLinkedTo( ThisRecID, ByThisLink, InTableB ); > > // and for recursive links: > > TableA.FindChildsOf( ThisRcID, ByThisLink ) > TableA.FindParentsOf( ThisRcID, ByThisLink ) > > Problem is that somebody can use this for non-recursive ... > May be its possible to prevent this ... It needs to think about this . Ed: No! Bad idea. ==== Sleep is a wonderful thing. Last night in bed I finally figured out what the problem is with this whole mess, why the "parent/child" nomenclature has been so confusing for me, and how this nomenclature ends up taking a very simple mechanism and makes it confusing -- with no need. I've never understood why you even needed to make a special case for handling recursion in the case when TableA = TableB. And now I'm convinced that the fact is you do NOT need to talk about recursion at all. To do so only makes things unnecessarily confusing for the user. ... or possibly I've got this wrong and I'm still the one who is very confused. Let's find out: ======= Here's the problem: When I DEFINE a binary link I do so using the following call: CreateBinaryLink( inName as String, inLeftTable as VTable, inRightTable as VTable, inLeftPower as EVLinkType = kOne, inRightPower as EVLinkType = kMany, inOnDelete as EVOnDelete = kSetNull, inStorageType as EVStorageType = kDefault inTemporary as Boolean = false ) as VBinaryLink This is very good. It is simple. I understand it. I like it. But note: This call uses the terms "Left", "Right", "One", and "Many". NOWHERE do I see the terms "Parent" or "Child". ====== Then there is the documentation for how to add a link: LinkRecords( inRecID() as Integer ) Parameter: inRecID Description: The RecID of a record of the left table. Establishes a link between records of linked Tables, specified as an array of RecID values (Valentina 2.0 supports 2-branch links only, so 2 records must be specified). The array must contains the correct number of values, in the order of branches of this link. The order of branches corresponds to the order of Tables on link creation. Example: dim recs(1) as integer // allocate array with 2 items. // Link record 1 of the left table to record 3 of // the right table of the Link. recs(0) = 1 recs(1) = 3 Link.LinkRecords( recs ) This is less good. It is simple, but it is confusing. I read this 5 times and came up with three understandings. Only the example made it possible for me to understand this. And a different choice of values in the example would be helpful. Here is a proposal for what I think it means: LinkRecords( inRecIdPair() as Integer ) where inRecIdPair is an array of two integers containing: ( leftTableRecId, rightTableRecId ) Establishes a link between records of linked tables, specified as an ordered array of RecID values. (Valentina 2.0 supports 2-branch links only, so 2 records must be specified). The array must contain only two elements with the recId for the leftTable in the first, and the recId for the rightTable in the second as defined in the CreateBinaryLink call used to define the link. Example: dim recs(1) as integer // allocate array with 2 items. // Link record 5 of the left table to record 9 of // the right table of the Link. recs(0) = 5 // LeftTable RecId recs(1) = 9 // RightTable RecId Link.LinkRecords( recs ) This call also uses the terms "Left" and "Right" NOWHERE do I see the terms "Parent" or "Child". This is not a horrible interface in terms of efficiency, because I can simply create an array called recs and repeatedly call LinkRecords with that same array, just as you show in your example. But since "Valentina 2.0 supports 2-branch links only", it would be much more convenient for me, and arguably faster code, if I could simply call: Link.Link2Records( leftTableRecID, rightTableRecID ) The call may not be generalized for future use of longer "recs(N)" arrays, but it sure would be nice for those of us using this today. =============== Then comes the access call to use the link: FindLinked( inRecID as Integer, inTableA as VTable, inTableB as VTable, inRecursionDirection as EVRecursionDirection = kFromParentToChild ) as VArraySet And all of a sudden I am presented with new concepts I have never before seen -- AND SHOULD NOT NEED! Pointing out that when inTableA = inTableB the relationship happens to be recursive is interesting I suppose, but neither useful nor helpful. Requiring the user to now think in new terms they have never used before, namely "parent" and "child" is both confusing and unnecessary. I would far rather use one of the following alternatives: FindLeftLink( rightRecID ) FindRightLink( leftRecID ) or if necessary: FindLinked( inRecID, EVLinkSide ) where EVLinkSide.kGetLeftLink returns a left link. and EVLinkSide.kGetRightLink returns a right link. Since inTableA and inTableB have already been established when I defined the link, why should I have to refer to them here? On 12/11/05 3:34 AM, "Ruslan Zasukhin" wrote: >> ED: >> Woops! Since this is a M:M link, does "kFromParentToChild" have any meaning >> here? > >> How do I signify I want recId's for right links rather than left >> links for recId = 2 ? > RUSLAN: > Yes still have > > I like this example: > > Table Person with recursive link HaveBorn > > So we have here in fact link 2 : M which still is M : M. > Right? > > Now let we take Person with RecId = 1024, > Let this will be Ruslan. > > res = Born.FindLinked( 1024, Person, Person, ???? ) > > So whom you want find? > > A) Children of Ruslan: > > childs = Born.FindLinked( 1024, Person, Person, kFromPArentToChilds) > > b) Children of Ruslan: > > parents = Born.FindLinked( 1024, Person, Person, kFromChildsToParent) > Based on this response, my guess is that that what you mean by this is the same as: FindLinked( inRecID, inTableA, inTableB, anEVRecursionDirection ) Where: EVRecursionDirection.kFromParentToChild means kGetTableALink implying that inRecID is aTableBRecId EVRecursionDirection.kFromChildToParent means kGetTableBLink implying that inRecID is aTableARecId If you say this is true, then I now understand how FindLinked works and I will define these constants and ignore all of the discussion of recursion in the documentation -- which I believe is irrelevant, confusing, and unnecessary. If you say this is not true, then I am still confused. ====== Furthermore, if the above is true, then... ====== On 11/15/05 1:41 AM, "Ruslan Zasukhin" wrote: >> ED: >> Ok, now we're getting somewhere, and somewhere that makes some good >> intuitive sense. >> >> Based on the above, would the following statements be true? >> >> S1) Creating a non-unique ObjectPtr field that contains recID values >> referring to records in the same table that contains the ObjectPtr field >> inherently defines a one to many relationship between a record indexed by a >> specific recID value, and all of the records that contain that recID value >> in their ObjectPtr field. > > YES. The same correct for 2 different tables. > >> S2) If the ObjectPtr field referring to recId values in the same table that >> contains the field is also defined as having unique values, then the >> relationship established is inherently one to one. > > YES. The same correct for 2 different tables. > >> S3) A one to many relationship can also be referred to as a "parent/child" >> relationship in which any one record associated with a given recID value is >> called the parent of all child records that contain that recID value in >> their ObjectPtr field. > > YES > >> If these are true, then these are the "missing" implicit information that >> experienced database users may take for granted, but which novices (or picky >> readers like myself) would appreciate seeing explicitly stated in the >> documentation. > > AGREE DISAGREE! The documentation should have no need to refer to Parent/Child relationships in order to understand how to use the FindLinked function. A discussion of the recursive nature of relationships when inTableA = inTableB may be appropriate for a nice side-bar comment, but there is no need for it the description for defining or using FindLinked and similar functions. >> This is still insufficient however, to explicitly explain what values of >> inRecursionDirection actually do. Let me attempt to define those as well: > > Yes, I think it needs add some pictures also Not really. It just needs a simpler explanation. >> S4) When calling aLink.FindLinked( inRecID, inTableA, inTableB, >> inRecursionDirection ) with inTableA = inTableB, then a value of >> inRecursionDirect = kFromParentToChild returns a VArraySet with the recID of >> zero, one, or many children records having inRecID as the value of their >> ObjectPtr field; whereas > >> S5) inRecursionDirect = kFromChildToParent returns a VArraySet with at most >> a single parent record identified by the non-zero value in the ObjectPtr >> field value of the child record indexed by recID. If the ObjectPtr field >> contains zero then the returned VArraySet is empty. > > Right. Wrong. The unstated implication of my description above that was in my mind when I wrote these was that FindLinked was trying to be clever by looking at the inLeftPower and inRightPower arguments to CreateBinaryLink to determine whether the Left side was the parent of the Right side or whether the Right side was the Parent of the left side. This is why I stated: >>>> ED: >>>> Woops! Since this is a M:M link, does "kFromParentToChild" >>>> have any meaning here? But your latest answers suggests that FindLinked is not trying to do anything so clever as this, and that all the EVRecursionDirection argument serves to do is signify "Find a left link" or "Find a right link". True? The unstated implication in many of your responses has been that whenever you define a relationship as a link from TableA to TableB that the parent side is always named first and the child side is always named second. Thus when you say: > RUSLAN > I like this example: > > Table Person with recursive link HaveBorn > > So we have here in fact link 2 : M which still is M : M. > Right? > > Now let we take Person with RecId = 1024, > Let this will be Ruslan. > > res = Born.FindLinked( 1024, Person, Person, ???? ) > > So whom you want find? > > A) Children of Ruslan: > > childs = Born.FindLinked( 1024, Person, Person, kFromPArentToChilds) > > b) Children of Ruslan: > > parents = Born.FindLinked( 1024, Person, Person, kFromChildsToParent) > This example ONLY works because in your own mind you assumed that "HaveBorn" (which I would have named "isParentOf") means that when you define the link you will always specify the parents on the left side of the link and the children on the right side of the link. And because you do this it just so happens that kFromParentToChild and kFromChildToParent work as you intended. But what if in my mind I choose to implement the "isChildOf" relation instead? That would put the children on the left and the parents on the right. In that case kFromParentToChild would not return me what I want or expect. Nowhere is this dependency made clear in the documentation. Nor should it have to be. If we simply use "Left" and "Right" instead of "Parent" and "Child" then there is never any ambiguity because we use the same terms for access as we used for definition. And there is no "recursion" mess to have to worry about or explain. > RUSLAN > Only not complete yet: > > * you talk only about ObjectPtr always. > > * Valentina 2 have also link - FOREIGN KEY. > it is similar to ObjectPtr by nature. It is a field. > > * Valentina 2 also have new link -- BbinaryLink. This is not a field at all. > > Methods of Vlink class work for ALL link kinds. So it needs write text in > general form. Yes, I understand that much better now. From sunshine at public.kherson.ua Sun Dec 11 16:34:26 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 08:35:03 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 3:30 PM, "Ed Kleban" wrote: > This example ONLY works because in your own mind you assumed that "HaveBorn" > (which I would have named "isParentOf") means that when you define the link > you will always specify the parents on the left side of the link and the > children on the right side of the link. And because you do this it just so > happens that kFromParentToChild and kFromChildToParent work as you intended. > > But what if in my mind I choose to implement the "isChildOf" relation > instead? That would put the children on the left and the parents on the > right. In that case kFromParentToChild would not return me what I want or > expect. I believe (hope) that our docs say: Left table == Parent Table Right table == Child table > Nowhere is this dependency made clear in the documentation. Then ops. > Nor should it have to be. If we simply use "Left" and "Right" instead of > "Parent" and "Child" then there is never any ambiguity because we use the same > terms for access as we used for definition. And there is no "recursion" mess > to have to worry about or explain. You mean to rename constants ??? Still not sure. IF you will draw records as graph you will get hierachy. So term FromParentToChilds means how you want move in hierarchy of objects. We could use also: kToDown, kToUp may be -- 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] From sunshine at public.kherson.ua Sun Dec 11 16:44:48 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 08:45:23 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 3:30 PM, "Ed Kleban" wrote: >> I like this example: >> >> Table Person with recursive link HaveBorn >> >> So we have here in fact link 2 : M which still is M : M. >> Right? >> >> Now let we take Person with RecId = 1024, >> Let this will be Ruslan. >> >> res = Born.FindLinked( 1024, Person, Person, ???? ) >> >> So whom you want find? >> >> A) Children of Ruslan: >> >> childs = Born.FindLinked( 1024, Person, Person, kFromPArentToChilds) >> >> b) Children of Ruslan: >> >> parents = Born.FindLinked( 1024, Person, Person, kFromChildsToParent) >> > > Based on this response, my guess is that that what you mean by this is the > same as: > > FindLinked( inRecID, inTableA, inTableB, anEVRecursionDirection ) > > Where: > EVRecursionDirection.kFromParentToChild means kGetTableALink > implying that inRecID is aTableBRecId > > EVRecursionDirection.kFromChildToParent means kGetTableBLink > implying that inRecID is aTableARecId > > If you say this is true, then I now understand how FindLinked works and I > will define these constants and ignore all of the discussion of recursion in > the documentation -- which I believe is irrelevant, confusing, and > unnecessary. > > If you say this is not true, then I am still confused. This is other side of truth. This LAST parameter is required only for recursive link. We have told about this before. When you have 2 table Left and Right all is simply. YES, you CAN think about recursive table as about 2 tables. But we use recursion params and description in docs BECAUSE you HAVE RECURSIVE link in fact. The TIP: "I can think about it as 2 tables", do not eliminate fact of recursive nature if link. You see? -- 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] From Ed at Kleban.com Sun Dec 11 09:19:41 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 09:20:10 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 8:34 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 3:30 PM, "Ed Kleban" wrote: > >> This example ONLY works because in your own mind you assumed that "HaveBorn" >> (which I would have named "isParentOf") means that when you define the link >> you will always specify the parents on the left side of the link and the >> children on the right side of the link. And because you do this it just so >> happens that kFromParentToChild and kFromChildToParent work as you intended. >> >> But what if in my mind I choose to implement the "isChildOf" relation >> instead? That would put the children on the left and the parents on the >> right. In that case kFromParentToChild would not return me what I want or >> expect. > > I believe (hope) that our docs say: > > Left table == Parent Table > > Right table == Child table > > Not really. It is the case in V4RB_Reference_2 for specifically the method: CreateForeignKeyLink( inName as String, inKeyField as VField, inPtrField as VField, inOnDelete as EVOnDelete = kSetNull, inOnUpdate as EVOnUpdate = kCascade, inTemporary as Boolean = false ) as VLink Parameter: Description: inName The name of link. inKeyField The PRIMARY KEY field of ONE Table. inPtrField The PTR field in the MANY Table. inOnDelete The behavior on deletion of record-owner. inOnUpdate The behavior on update of record-owner. inTemporary TRUE if link is temprary. That you point out: To specify a foreign key link you need to define the following: ? A name for the link, unique in the scope of the database. ? The KEY field of the Parent table (ONE table). ? The PTR field of the Child table (MANY table). ? The behavior of the link on deletion of a record in the Parent Table. ? The behavior of the link on update of a KEY field value in the Parent Table. I.e. you associate Parent with ONE and Child with Many. This makes perfect sense and I agree with it. But the terms "Parent" and "Child" are not even used in the description of CreateBinaryLink. Nor do I think they need to be or possibly even should be. Unlike CreateForeignKeyLink, the CreateBinaryLink command can create 1:1, 1:M, M:1, and M:M relations ships -- as you have frequently pointed out to me. In this more generalized definition the concepts of "Parent" and "Child" are less clear, may be irrelevant, and I would argue only offer an opportunity for more confusion. Why should I not be able to implement a "ChildOf" relationship if I so choose instead of a "ParentOf" relation ship? If I can use kLeftSide and kRightSide as arguments to FindLinked it makes it perfectly explicit what I want in terms of the relationship that I envision in my own head. It makes sense and works for 1:1, 1:M, M:1, M:M. It makes sense and words for TableA = TableB and TableA <> TableB. It makes sense if I define my relation ship as "ParentOf", "ChildOf", "GivesTo", "TakesFrom", or anything else. And it does not ever result in the confusion you have, nor make any special fuss about "recursion" that arises when you are faced with trying to figure out how to use, and make sure you have defined your link correctly for kFromParentToChild vs kFromChildToParent. >> Nowhere is this dependency made clear in the documentation. > > Then ops. Yes, "oops". ("ops" = an abbreviation for operations) ("oops" = woops, we must have left that out) >> Nor should it have to be. If we simply use "Left" and "Right" instead of >> "Parent" and "Child" then there is never any ambiguity because we use the >> same >> terms for access as we used for definition. And there is no "recursion" mess >> to have to worry about or explain. > > You mean to rename constants ??? > > Still not sure. > > We could use also: kToDown, kToUp may be > I mean this: If you use the terms "LEFT" and "RIGHT" when you define the table in CreateBinaryLink, then you should be able to use the terms "LEFT" and "RIGHT" when you use the link in FindLinked. If you want to use Parent and Child for the case of 1:M that's fine. If you want to use kDown and Kup that's fine. But PLEASE define a syntax that uses the same terms in CreateBinaryLink that you use in FindLinked. I happen to think that "Left" and "Right" are good simple terms that make sense. > IF you will draw records as graph you will get hierachy. > So term FromParentToChilds means how you want move in hierarchy of objects. Yes that is true. And you can talk about this if you want. It is interesting. It may even be useful. But it is NOT necessary to understand and use FindLinked if you can specify whether you want to get a VArraySet of LeftLinks vs getting a VArraySet of RightLinks. Specifying Left and Right is always clear. Referring to "Parent" and "Child" is not clear and offers the opportunity for error if you define your table wrong and end up using kFromParentToChild backwards. From sunshine at public.kherson.ua Sun Dec 11 17:27:00 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:27:36 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 5:19 PM, "Ed Kleban" wrote: > I.e. you associate Parent with ONE and Child with Many. This makes perfect > sense and I agree with it. Right, this is standard assumption. -- 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] From sunshine at public.kherson.ua Sun Dec 11 17:31:06 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:31:41 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 5:19 PM, "Ed Kleban" wrote: > > Unlike CreateForeignKeyLink, the CreateBinaryLink command can create 1:1, > 1:M, M:1, and M:M relations ships -- as you have frequently pointed out to > me. In this more generalized definition the concepts of "Parent" and > "Child" are less clear, may be irrelevant, and I would argue only offer an > opportunity for more confusion. IF BinaryLink is type 1 : M THEN we can use Parent-Child terminology. No difference to FK. But for M : M this not works! Right. Also note, that 1:1 (binary) link and M : M link on default do not know which table is owner. * Usually in 99% any of them is NOT owner. * we have symmetry * But if your task require you still can specify OWNER -- 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] From Ed at Kleban.com Sun Dec 11 09:32:36 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 09:33:05 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 8:44 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 3:30 PM, "Ed Kleban" wrote: > >>> I like this example: >>> >>> Table Person with recursive link HaveBorn >>> >>> So we have here in fact link 2 : M which still is M : M. >>> Right? >>> >>> Now let we take Person with RecId = 1024, >>> Let this will be Ruslan. >>> >>> res = Born.FindLinked( 1024, Person, Person, ???? ) >>> >>> So whom you want find? >>> >>> A) Children of Ruslan: >>> >>> childs = Born.FindLinked( 1024, Person, Person, kFromPArentToChilds) >>> >>> b) Children of Ruslan: >>> >>> parents = Born.FindLinked( 1024, Person, Person, kFromChildsToParent) >>> >> >> Based on this response, my guess is that that what you mean by this is the >> same as: >> >> FindLinked( inRecID, inTableA, inTableB, anEVRecursionDirection ) >> >> Where: >> EVRecursionDirection.kFromParentToChild means kGetTableALink >> implying that inRecID is aTableBRecId >> >> EVRecursionDirection.kFromChildToParent means kGetTableBLink >> implying that inRecID is aTableARecId >> >> If you say this is true, then I now understand how FindLinked works and I >> will define these constants and ignore all of the discussion of recursion in >> the documentation -- which I believe is irrelevant, confusing, and >> unnecessary. >> >> If you say this is not true, then I am still confused. > > This is other side of truth. > > This LAST parameter is required only for recursive link. We have told about > this before. When you have 2 table Left and Right all is simply. Yes, I understand. But if you have a syntax of either: FindLeftLink( rightRecID ) FindRightLink( leftRecID ) or if necessary: FindLinked( inRecID, EVLinkSide ) where EVLinkSide.kGetLeftLink returns a left link. and EVLinkSide.kGetRightLink returns a right link. Then: 1) You do not need to list the Tables. 2) You do not need a special argument for the recursive case. 3) The syntax of the Find command does not impose an artificial restriction on how to define your links in order to make sure that kFromParentToChild works correctly. 4) The syntax makes it very clear which table the returned RecIDs in VArraySet will come from. > YES, you CAN think about recursive table as about 2 tables. > > > But we use recursion params and description in docs BECAUSE > you HAVE RECURSIVE link in fact. > > The TIP: "I can think about it as 2 tables", do not eliminate fact of > recursive nature if link. > > You see? > Yes. I see and I understand and I agree. I am a big fan of Recursion. I like it a lot. I use it every day. Talking about the recursive case when TableA = TableB as a side comment in the documentation for clarification or to be informative is a fine thing. But providing a syntax that makes it necessary to think in these terms, (unfortunately compounded by unclear documentation that doesn't explain how to define your table so that the EVRecursionDirection values will work properly) is overly complicated and unnecessary in my opinion. And providing a powerful, generalized BinaryLink mechanism that can be used to define 1:M, M:M, M:1, and 1:1 links... but then telling the user "Oh but if you have M:1 in your mind change it to 1:M in the call to CreateBinaryLink or else the EVRecursionDirection parameters will work wrong when you call FindLinked." is limiting, unnecessary, and offers the potential for confusion and error. My subject should not have been "Death to Recursion!" it should have been "Death to Inconsistent nomenclature in functions that define a link from from functions which use a link". But "Death to Recursion!" is shorter and has a nice ring to it. It got your attention, didn't it ? ;-) --Ed From sunshine at public.kherson.ua Sun Dec 11 17:36:19 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:36:57 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 5:19 PM, "Ed Kleban" wrote: > Why should I not be able to implement a "ChildOf" relationship if I so > choose instead of a "ParentOf" relation ship? Because usually when people draw hierarchy of objects they put on top the parents. I have now wish to draw several pictures which explain this more clean. Ed, you CAN make "ChildOf" relation. tableA isChildOf tableB No problems. But now rotate it in mind TableA isChildOf TableB Our parameter kFromParentToChild, will move you DOWN by hierarchy. So from top table to down table I start to more like names: kDown, kUp (or other correct english terms) > If I can use kLeftSide and > kRightSide as arguments to FindLinked it makes it perfectly explicit what I > want in terms of the relationship that I envision in my own head. It makes > sense and works for 1:1, 1:M, M:1, M:M. It makes sense and words for TableA > = TableB and TableA <> TableB. It makes sense if I define my relation ship > as "ParentOf", "ChildOf", "GivesTo", "TakesFrom", or anything else. > > And it does not ever result in the confusion you have, nor make any special > fuss about "recursion" that arises when you are faced with trying to figure > out how to use, and make sure you have defined your link correctly for > kFromParentToChild vs kFromChildToParent. -- 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] From sunshine at public.kherson.ua Sun Dec 11 17:37:38 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:38:14 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 5:19 PM, "Ed Kleban" wrote: >> IF you will draw records as graph you will get hierachy. >> So term FromParentToChilds means how you want move in hierarchy of objects. > > Yes that is true. And you can talk about this if you want. It is > interesting. It may even be useful. > > But it is NOT necessary to understand and use FindLinked if you can specify > whether you want to get a VArraySet of LeftLinks vs getting a VArraySet of > RightLinks. > > Specifying Left and Right is always clear. Referring to "Parent" and > "Child" is not clear and offers the opportunity for error if you define your > table wrong and end up using kFromParentToChild backwards. Okay, Try to make description of this function which is good from your point of view. -- 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] From sunshine at public.kherson.ua Sun Dec 11 17:40:30 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:41:06 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 5:19 PM, "Ed Kleban" wrote: > If you use the terms "LEFT" and "RIGHT" when you define the table in > CreateBinaryLink, then you should be able to use the terms "LEFT" and > "RIGHT" when you use the link in FindLinked. Well, we can easy have 3 sets of constants to satisfy everybody EVRecursiveDirection { kFromLeftToRight = 1, kFromRightToLeft = 2, kToDown = 1, kToup = 2, kFromParentToChild = 1 kFromChildToParet = 2 } -- 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] From sunshine at public.kherson.ua Sun Dec 11 17:43:20 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:43:59 2005 Subject: more VLink2 methods // Death to recursion! In-Reply-To: Message-ID: On 12/11/05 5:32 PM, "Ed Kleban" wrote: > > Yes, I understand. But if you have a syntax of either: > > FindLeftLink( rightRecID ) > FindRightLink( leftRecID ) > > or if necessary: > > FindLinked( inRecID, EVLinkSide ) > > where EVLinkSide.kGetLeftLink returns a left link. > and EVLinkSide.kGetRightLink returns a right link. > > Then: > 1) You do not need to list the Tables. > 2) You do not need a special argument for the recursive case. > 3) The syntax of the Find command does not impose an artificial > restriction on how to define your links in order to make sure > that kFromParentToChild works correctly. > 4) The syntax makes it very clear which table the returned RecIDs > in VArraySet will come from. Right. We have similar methods on C++ in the class VLink2 Keep in mind: Vlink -- this is general class of Vlink. future we can have Link_N which links N tables. VLink2 -- is subclass of Vlink and is parent of 3 links: FK, ObjectPtr and BinaryLink. In VLink2 we can introduce set of methods that have SIMPLER syntax than Vlink methods. Right. Just was no time to finish this job ... -- 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] From sunshine at public.kherson.ua Sun Dec 11 17:45:31 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 09:46:05 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 5:32 PM, "Ed Kleban" wrote: > And providing a powerful, generalized BinaryLink mechanism that can be used > to define 1:M, M:M, M:1, and 1:1 links... but then telling the user > > "Oh but if you have M:1 in your mind change it to 1:M in the call to > CreateBinaryLink or else the EVRecursionDirection parameters will work > wrong when you call FindLinked." > > is limiting, unnecessary, and offers the potential for confusion and error. Okay I agree > My subject should not have been "Death to Recursion!" it should have been > "Death to Inconsistent nomenclature in functions that define a link from > from functions which use a link". > But "Death to Recursion!" is shorter and has a nice ring to it. It got > your attention, didn't it ? Hard to say I read all your letters very carefully :-) -- 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] From Ed at Kleban.com Sun Dec 11 10:00:17 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 10:00:46 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 9:31 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 5:19 PM, "Ed Kleban" wrote: > >> >> Unlike CreateForeignKeyLink, the CreateBinaryLink command can create 1:1, >> 1:M, M:1, and M:M relations ships -- as you have frequently pointed out to >> me. In this more generalized definition the concepts of "Parent" and >> "Child" are less clear, may be irrelevant, and I would argue only offer an >> opportunity for more confusion. > > IF BinaryLink is type 1 : M THEN we can use Parent-Child terminology. > > No difference to FK. > > > But for M : M this not works! Right. > > > Also note, that 1:1 (binary) link and M : M link on default do not know > which table is owner. > > * Usually in 99% any of them is NOT owner. > > * we have symmetry > > * But if your task require you still can specify OWNER > Aha! Now there's a dimension I've been missing, and it explains much. You are also trying to overload determination of which Table if either is the owner when a link is defined. That's a whole different matter. And one I hadn't really considered since in the apps I'm working with I never expect to delete records. I propose that the correct solution to this is to make ownership EXPLICIT when you define the link. Namely: CreateBinaryLink( inName as String, inLeftTable as VTable, inRightTable as VTable, inLeftPower as EVLinkType = kOne, inRightPower as EVLinkType = kMany, inOnDelete as EVOnDelete = kSetNull, inStorageType as EVStorageType = kDefault, inTemporary as Boolean = false, inOwner as EVOwner = kLeftTable, ) as VBinaryLink where enurations for EVOwner are: kLeftTable, kRightTable, kNoOwner Thus the left table is always the owner by default. But as you say, for now it is always possible to simply state: aNewlyCreatedBinaryLink.Owner = TableA From Ed at Kleban.com Sun Dec 11 10:03:07 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 10:03:36 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 9:36 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 5:19 PM, "Ed Kleban" wrote: > >> Why should I not be able to implement a "ChildOf" relationship if I so >> choose instead of a "ParentOf" relation ship? > > Because usually when people draw hierarchy of objects they put on top the > parents. > > I have now wish to draw several pictures which explain this more clean. > > Ed, you CAN make "ChildOf" relation. > > tableA isChildOf tableB > > No problems. But now rotate it in mind > > TableA > > isChildOf > > TableB > > Our parameter kFromParentToChild, will move you DOWN by hierarchy. > So from top table to down table > > I start to more like names: kDown, kUp (or other correct english terms) I don't. I think you have perfectly good names right now, namely "Left" and "Right". They are simple, natural, and inuitive. You could call them Up and Down, or A and B, or 1 and 2, or Punch and Judy... it really doesn't matter as long as you use the same terms in both CreateBinaryLink and FindLinked. >> If I can use kLeftSide and >> kRightSide as arguments to FindLinked it makes it perfectly explicit what I >> want in terms of the relationship that I envision in my own head. It makes >> sense and works for 1:1, 1:M, M:1, M:M. It makes sense and words for TableA >> = TableB and TableA <> TableB. It makes sense if I define my relation ship >> as "ParentOf", "ChildOf", "GivesTo", "TakesFrom", or anything else. >> >> And it does not ever result in the confusion you have, nor make any special >> fuss about "recursion" that arises when you are faced with trying to figure >> out how to use, and make sure you have defined your link correctly for >> kFromParentToChild vs kFromChildToParent. > > > > From Ed at Kleban.com Sun Dec 11 10:08:11 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 10:08:40 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 9:37 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 5:19 PM, "Ed Kleban" wrote: > >>> IF you will draw records as graph you will get hierachy. >>> So term FromParentToChilds means how you want move in hierarchy of objects. >> >> Yes that is true. And you can talk about this if you want. It is >> interesting. It may even be useful. >> >> But it is NOT necessary to understand and use FindLinked if you can specify >> whether you want to get a VArraySet of LeftLinks vs getting a VArraySet of >> RightLinks. >> >> Specifying Left and Right is always clear. Referring to "Parent" and >> "Child" is not clear and offers the opportunity for error if you define your >> table wrong and end up using kFromParentToChild backwards. > > Okay, > > Try to make description of this function which is good from your point of > view. What I would like to see are: aVLink.Link2Records( leftTableRecID, rightTableRecID ) aVLink2.LinkRecords ( leftTableRecID, rightTableRecID ) FindLeftLink( rightRecID ) FindRightLink( leftRecID ) A quick interim fix I will use with FindLinked in the mean time is the equivalent of: const kGetLeftLink = EVRecursionDirection.kFromParentToChild const kGetRightLink = EVRecursionDirection.kFromChildToParent From Ed at Kleban.com Sun Dec 11 10:10:23 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 10:10:53 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 10:08 AM, "Ed Kleban" wrote: > > > > On 12/11/05 9:37 AM, "Ruslan Zasukhin" wrote: > >> On 12/11/05 5:19 PM, "Ed Kleban" wrote: >> >>>> IF you will draw records as graph you will get hierachy. >>>> So term FromParentToChilds means how you want move in hierarchy of objects. >>> >>> Yes that is true. And you can talk about this if you want. It is >>> interesting. It may even be useful. >>> >>> But it is NOT necessary to understand and use FindLinked if you can specify >>> whether you want to get a VArraySet of LeftLinks vs getting a VArraySet of >>> RightLinks. >>> >>> Specifying Left and Right is always clear. Referring to "Parent" and >>> "Child" is not clear and offers the opportunity for error if you define your >>> table wrong and end up using kFromParentToChild backwards. >> >> Okay, >> >> Try to make description of this function which is good from your point of >> view. > > What I would like to see are: > > aVLink.Link2Records( leftTableRecID, rightTableRecID ) > > aVLink2.LinkRecords ( leftTableRecID, rightTableRecID ) Actually, since RB has supported paramArray arguments for quite some time you could even support: aVLink.LinkRecords ( paramArray inOrderedLinkRecIds as Integer ) > FindLeftLink( rightRecID ) > FindRightLink( leftRecID ) > > A quick interim fix I will use with FindLinked in the mean time is the > equivalent of: > > const kGetLeftLink = EVRecursionDirection.kFromParentToChild > const kGetRightLink = EVRecursionDirection.kFromChildToParent > > > From Ed at Kleban.com Sun Dec 11 10:12:14 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 10:12:43 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 9:45 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 5:32 PM, "Ed Kleban" wrote: > >> And providing a powerful, generalized BinaryLink mechanism that can be used >> to define 1:M, M:M, M:1, and 1:1 links... but then telling the user >> >> "Oh but if you have M:1 in your mind change it to 1:M in the call to >> CreateBinaryLink or else the EVRecursionDirection parameters will work >> wrong when you call FindLinked." >> >> is limiting, unnecessary, and offers the potential for confusion and error. > > Okay I agree > >> My subject should not have been "Death to Recursion!" it should have been >> "Death to Inconsistent nomenclature in functions that define a link from >> from functions which use a link". > >> But "Death to Recursion!" is shorter and has a nice ring to it. It got >> your attention, didn't it ? > > Hard to say > > I read all your letters very carefully :-) With as many syllables as I use in most of the fancy words when I write, you have to read my email carefully anyway -- even if you speak very good English :-) From sunshine at public.kherson.ua Sun Dec 11 19:28:35 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 11:29:11 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 6:08 PM, "Ed Kleban" wrote: > A quick interim fix I will use with FindLinked in the mean time is the > equivalent of: > > const kGetLeftLink = EVRecursionDirection.kFromParentToChild ^^^^^^^^^^^^^^^^ why left? This is right. from Parent/Left to Chile/Rigth So you get set of records from RIGHT table > const kGetRightLink = EVRecursionDirection.kFromChildToParent -- 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] From sunshine at public.kherson.ua Sun Dec 11 19:48:20 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 11 11:48:55 2005 Subject: [V4RB] API way, how to set field value of found record. In-Reply-To: Message-ID: On 12/11/05 7:29 PM, "jda" wrote: > I was just about to write to about that! The API way looks easier But it is not good for remote server work > (and more intuitive). For example, I can to this to see if the field > I want exists: > if myDatabase.myReferenceText.refPtr.ValueExists(refPtr) and > myDatabase.myReferenceText.labelPtr.ValueExists(index + 1) then... > But how do I turn that field into something I can get/set via API > .getString/.setString? What is the syntax for > > ...the text field where refPtr = 1 AND labelPtr = 3... > > so I can set it? You need obtain RecID So you need change your code as: set1 = myDatabase.myReferenceText.refPtr.FindValue(refPtr) set2 = myDatabase.myReferenceText.labelPtr.FindValue( index+1, set1 ) // now yoy have found set2 records which refers to your book AND // to required label. // I assume that set2 contains ONLY one record. // so it can be good idea to use FindValueAsArraySet() // or even better FindSingleValue() recid = myReferenceText.labelPtr.FindSingleValue( index+1, set1 ) Now you know record of table B which you need. so tblB.Recid = recid tblB.fldText.SetString ......... -- 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] From Ed at Kleban.com Sun Dec 11 11:55:27 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 11:55:56 2005 Subject: Death to recursion! Re: Child vs parent records In-Reply-To: Message-ID: On 12/11/05 11:28 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 6:08 PM, "Ed Kleban" wrote: > >> A quick interim fix I will use with FindLinked in the mean time is the >> equivalent of: >> >> const kGetLeftLink = EVRecursionDirection.kFromParentToChild > ^^^^^^^^^^^^^^^^ > > why left? This is right. Yes, quite correct. Typo on my part. Thanks for the correction. > from Parent/Left to Chile/Rigth > > So you get set of records from RIGHT table > > >> const kGetRightLink = EVRecursionDirection.kFromChildToParent From Ed at Kleban.com Sun Dec 11 15:34:36 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 15:35:06 2005 Subject: Sequential filtering in SQL Message-ID: Ok Ruslan, Time for a brand new topic. I starting to work on the part of the design that will use the bit_and( x, y ) operator you have provided to allow me to do some masked filtering. I need to apply multiple filters in multiple separate passes to take a big list and make it smaller and smaller with each filter pass until I have only the records I want remaining. If bit_and were available as an API call, this would be very simple. I would simply do a Find to get a VSet, then do more Finds using the previous VSet result as an "inSet" argument for the next filter pass. But unfortunately bit_and is not an API call, it is an SQL call. So I need to figure out how to do this in SQL. There are two intuitive ways that come to mind: 1) Make a nested SQL SELECT Statement with a WHERE inside of a WHERE inside of a WHERE to apply all the filters. Unfortunately I need to keep the result of the first filter (the outside WHERE) around in memory so that I can one of many different second-level filters on this smaller list at any time. So nesting WHERE statements does not get me what I need. 2) See if I can find an some way to make a SELECT statement take an inSet argument like the API Find calls do. I.e. a list of records that the search is restricted to. Unfortunately, I have found no such declaration in the SQL manual. 3) Take the resulting Cursor I get back from the first Select, and build a new temporary in-memory table with the results of that cursor so that I can do the next SELECT statement on that new smaller table to create yet a third smaller table, and so forth. Unfortunately, I have not found any efficient command for telling either SQL or the API: "Take that VCursor that I just got back from the SELECT statement and turn it into a table." The only way I see to make a table from the result of a Select is to manually build a table and then copy the contents of the Cursor records into the new Table records one at a time in a loop. So... Unless you have a recommendation as to something more efficient I might try, my only option at this time seems to be the "manually build a new table with a loop from a Vcursor" technique for every level of filter I want to use. That make sense? Any suggestions? From Ed at Kleban.com Sun Dec 11 23:19:17 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 23:19:48 2005 Subject: FindLinkedSingle ? Message-ID: Gack! There's no FindLinkedSingle call in the API. Any reason why not? How much of our discussion from earlier today is it worthwhile for me to put on Manits Ruslan? Let's see... the possible list includes: 1) aVLink.Link2Records( leftTableRecID, rightTableRecID ) 2) aVLink2.LinkRecords ( leftTableRecID, rightTableRecID ) Actually, since RB has supported paramArray arguments for quite some time you could even support: 3) aVLink.LinkRecords ( paramArray inOrderedLinkRecIds as Integer ) 4a) FindLinked( inRecID as Integer, inResult as EVLink2Result ) as VArraySet 4b) FindLinked( inSet, inRecId, inResult ) as VArraySet along with: 5) EVLink2Result.kLeftLink = EVRecursionDirection.kFromChildToParent 6) EVLink2Result.kRightLink = EVRecursionDirection.kFromParentToChild and now I guess: 7) FindLinkedSingle( inRecId, inResult ) as Integer // Returns RecId from inResult side Of these proposals, I'd say: 4a, 4b, 5, and 6 are Low priority since they provide clarity but no new functionality. 1 or 2 would provide both an efficiency gain and result in cleaner code. Either would do. I don't know that VLink2 is defined for V4RB 7 similarly offers a minor efficiency gain and a little cleaner code. I wouldn't consider any of these high priority I guess. From Ed at Kleban.com Sun Dec 11 23:42:28 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sun Dec 11 23:43:00 2005 Subject: VLink Mess Re: FindLinkedSingle ? In-Reply-To: Message-ID: Nope. The list below won't work. I just couldn't figure out before "Why in the world would you pass TableA and TableB arguments to FindLinked when the Vlink already knows what the tables are?" The answer of course is that it doesn't know what the tables are. a VBinaryLink knows, but the FindLinked method has been defined to work on all types of Vlinks including Foreign Keys and presumably ObjectPtr links. This is probably the source for what has resulted in such a confusing mess. Now I understand. I appreciate and admire the goal of having a single set of calls at the VLink method that are uniform and universal. On the other hand doing so has resulted in a call that has all sorts of messy problems. What happens if you specify unrelated tables for the link? This is just asking for trouble to have a method that requires you to respecify the tables to use when that information is inherent in, or has been previously defined already for, the link. I discovered this when I went looking for the "TableA", "TableB", "LeftPower", and "RightPower" properties in class VLink and discovered... Doh! They're not there! I then went looking for them in the VBinaryLink class documentation and discovered that they weren't there either ... although this may simply be a documentation oversight. I'll have to think about this some more Ruslan. The proposed methods below would work certainly, but only if defined for class VBinaryLink, not for VLink or VLink2. The solution I was proposing is nowhere near as elegant as I had thought it was. Time for more sleep :) Nite! --Ed On 12/11/05 11:19 PM, "Ed Kleban" wrote: > Gack! > > There's no FindLinkedSingle call in the API. > > Any reason why not? > > How much of our discussion from earlier today is it worthwhile for me to put > on Manits Ruslan? > > Let's see... the possible list includes: > > > 1) aVLink.Link2Records( leftTableRecID, rightTableRecID ) > 2) aVLink2.LinkRecords ( leftTableRecID, rightTableRecID ) > > Actually, since RB has supported paramArray arguments for quite some time > you could even support: > > 3) aVLink.LinkRecords ( paramArray inOrderedLinkRecIds as Integer ) > > > 4a) FindLinked( inRecID as Integer, inResult as EVLink2Result ) > as VArraySet > > 4b) FindLinked( inSet, inRecId, inResult ) as VArraySet > > along with: > > 5) EVLink2Result.kLeftLink = > EVRecursionDirection.kFromChildToParent > 6) EVLink2Result.kRightLink = > EVRecursionDirection.kFromParentToChild > > and now I guess: > > 7) FindLinkedSingle( inRecId, inResult ) as Integer > // Returns RecId from inResult side > > > Of these proposals, I'd say: > > 4a, 4b, 5, and 6 are Low priority since they provide clarity but no new > functionality. > > 1 or 2 would provide both an efficiency gain and result in cleaner code. > Either would do. I don't know that VLink2 is defined for V4RB > > 7 similarly offers a minor efficiency gain and a little cleaner code. > > I wouldn't consider any of these high priority I guess. > > > From sunshine at public.kherson.ua Mon Dec 12 10:47:04 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 02:47:43 2005 Subject: FindLinkedSingle ? In-Reply-To: Message-ID: On 12/12/05 7:19 AM, "Ed Kleban" wrote: > There's no FindLinkedSingle call in the API. > > Any reason why not? How you can be sure ? Aha, sure is only if you move in director to : 1 -- 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] From sunshine at public.kherson.ua Mon Dec 12 10:52:19 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 02:52:57 2005 Subject: Sequential filtering in SQL In-Reply-To: Message-ID: On 12/11/05 11:34 PM, "Ed Kleban" wrote: Hi Ed, > Ok Ruslan, > > Time for a brand new topic. > > I starting to work on the part of the design that will use the bit_and( x, y > ) operator you have provided to allow me to do some masked filtering. I > need to apply multiple filters in multiple separate passes to take a big > list and make it smaller and smaller with each filter pass until I have only > the records I want remaining. > > If bit_and were available as an API call, this would be very simple. > I would simply do a Find to get a VSet, then do more Finds using the > previous VSet result as an "inSet" argument for the next filter pass. I think Table Methods = Calculated fields is an answer. You make some Method, setup its formula which return e.g. True/false Do set1 = fldMethod.FindValue( 1 ) Change method, and do next search. This will be not indexed searches. For super fast SEARCH you can have several methods which are indexed. In other words, you have pre-calculation in your hands. -- 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] From sunshine at public.kherson.ua Mon Dec 12 10:54:01 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 02:54:39 2005 Subject: Sequential filtering in SQL In-Reply-To: Message-ID: On 12/11/05 11:34 PM, "Ed Kleban" wrote: > I starting to work on the part of the design that will use the bit_and( x, y > ) operator you have provided to allow me to do some masked filtering. I > need to apply multiple filters in multiple separate passes to take a big > list and make it smaller and smaller with each filter pass until I have only > the records I want remaining. > > If bit_and were available as an API call, this would be very simple. > I would simply do a Find to get a VSet, then do more Finds using the > previous VSet result as an "inSet" argument for the next filter pass. > > But unfortunately bit_and is not an API call, it is an SQL call. So I need > to figure out how to do this in SQL. > > There are two intuitive ways that come to mind: > > 1) Make a nested SQL SELECT Statement with a WHERE inside of a WHERE inside > of a WHERE to apply all the filters. Unfortunately I need to keep the > result of the first filter (the outside WHERE) around in memory so that I > can one of many different second-level filters on this smaller list at any > time. So nesting WHERE statements does not get me what I need. > > 2) See if I can find an some way to make a SELECT statement take an inSet > argument like the API Find calls do. I.e. a list of records that the search > is restricted to. Unfortunately, I have found no such declaration in the > SQL manual. > > 3) Take the resulting Cursor I get back from the first Select, and build a > new temporary in-memory table with the results of that cursor so that I can > do the next SELECT statement on that new smaller table to create yet a third > smaller table, and so forth. Unfortunately, I have not found any efficient > command for telling either SQL or the API: "Take that VCursor that I just > got back from the SELECT statement and turn it into a table." The only way > I see to make a table from the result of a Select is to manually build a > table and then copy the contents of the Cursor records into the new Table > records one at a time in a loop. > > So... Unless you have a recommendation as to something more efficient I > might try, my only option at this time seems to be the "manually build a new > table with a loop from a Vcursor" technique for every level of filter I want > to use. About SQL. Why you cannot make SQL query which combine all your required filters by AND WHERE bit_and(f1,..) AND bit_and() AND bit_and ... -- 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] From sunshine at public.kherson.ua Mon Dec 12 10:56:15 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 02:56:56 2005 Subject: [V4RB] API way, how to set field value of found record. In-Reply-To: Message-ID: On 12/12/05 3:00 AM, "jda" wrote: > Also, I was using WriteRawData, but found only WriteData in the docs. > I assume they are identical, but maybe not? WriteRawData is deprecated. But still exists for back compatibility Prefer to use WriteData -- 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] From sunshine at public.kherson.ua Mon Dec 12 13:26:33 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 05:27:17 2005 Subject: VLink Mess Re: FindLinkedSingle ? In-Reply-To: Message-ID: On 12/12/05 7:42 AM, "Ed Kleban" wrote: > Nope. The list below won't work. I just couldn't figure out before "Why in > the world would you pass TableA and TableB arguments to FindLinked when the > Vlink already knows what the tables are?" > > The answer of course is that it doesn't know what the tables are. a > VBinaryLink knows, but the FindLinked method has been defined to work on all > types of Vlinks including Foreign Keys and presumably ObjectPtr links. Not only this reason. Mainly because with tables you can specify ORDER different than link it know -- 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] From sunshine at public.kherson.ua Mon Dec 12 13:29:10 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 05:30:05 2005 Subject: VLink Mess Re: FindLinkedSingle ? In-Reply-To: Message-ID: On 12/12/05 7:42 AM, "Ed Kleban" wrote: > Nope. The list below won't work. I just couldn't figure out before "Why in > the world would you pass TableA and TableB arguments to FindLinked when the > Vlink already knows what the tables are?" > > The answer of course is that it doesn't know what the tables are. a > VBinaryLink knows, but the FindLinked method has been defined to work on all > types of Vlinks including Foreign Keys and presumably ObjectPtr links. > > This is probably the source for what has resulted in such a confusing mess. > Now I understand. > > I appreciate and admire the goal of having a single set of calls at the > VLink method that are uniform and universal. On the other hand doing so > has resulted in a call that has all sorts of messy problems. I do not see any problems Ed. You have link PersonePhone. You can do 2 task: 1) you know some person recID and you want find its Phones: linkPersonPhone.FindLinked( recid, tblPerson, tblPhone ); 2) you know some phone and you want find persons that use it linkPersonPhone.FindLinked( recid, tblPhone, tblPerson ); Easy and clean !!! Where you see problems ? -- 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] From Ed at Kleban.com Mon Dec 12 08:24:25 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 08:24:59 2005 Subject: FindLinkedSingle ? In-Reply-To: Message-ID: On 12/12/05 2:47 AM, "Ruslan Zasukhin" wrote: > On 12/12/05 7:19 AM, "Ed Kleban" wrote: > >> There's no FindLinkedSingle call in the API. >> >> Any reason why not? > > How you can be sure ? > > Aha, sure is only if you move in director to : 1 > Yes. You can be sure if you've already done a lookup to determine count -- a function which V2 DOES offer. You can be sure if you're keeping a separate count so you already know if there is a link and how many links, but just not which link -- which I often do so that I don't incur the overhead for a needless lookup. And you can be sure if the relation ship is 1:1 or M:1, as you point out. And the benefits are: 1) Cleaner syntax 2) Less call and return processing overhead 3) You immediately stop searching as soon as you find one. ... and leads to a whole separate question about BinaryLink Lookup and Management efficiency that came up while sleeping last night and which I'll include in a separate email later. From ssa at sevenrays.ru Mon Dec 12 17:55:43 2005 From: ssa at sevenrays.ru (Alexey Starchikhin) Date: Mon Dec 12 08:57:20 2005 Subject: ODBC import Message-ID: <1101423158.20051212175543@sevenrays.ru> Good day! Is there any way to import data from Access database to Valentina via scripting in Director? My client wants complete automatic process, and he refuse to hear "Just start Valentina_ODBC_import, open all.xml, and press OK".. Any ideas? With best regards, Alexey Starchikhin From sunshine at public.kherson.ua Mon Dec 12 17:09:39 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 09:10:33 2005 Subject: ODBC import In-Reply-To: <1101423158.20051212175543@sevenrays.ru> Message-ID: On 12/12/05 4:55 PM, "Alexey Starchikhin" wrote: Hi Alexey, > Good day! > > Is there any way to import data from Access database to Valentina via > scripting in Director? No, this is feature of Valentina Studio only. > My client wants complete automatic process, and he refuse > to hear "Just start Valentina_ODBC_import, open all.xml, and press OK".. > > Any ideas? Well, we plan add JavaScript scripting to Valentina Studio, So it will be automated. Alex have made a lots of work -- plugin mostly was made as I know. But it needs yet integrate it into Vstudio yet. ------------- Why you cannot automate this process e.g. In this way: * you script Access itself to export info into text files * then you import that files fro Lingo using Cursor.Import -- 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] From Ed at Kleban.com Mon Dec 12 09:40:38 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 09:41:16 2005 Subject: Sequential filtering in SQL In-Reply-To: Message-ID: On 12/12/05 2:52 AM, "Ruslan Zasukhin" wrote: > On 12/11/05 11:34 PM, "Ed Kleban" wrote: > > Hi Ed, > >> Ok Ruslan, >> >> Time for a brand new topic. >> >> I starting to work on the part of the design that will use the bit_and( x, y >> ) operator you have provided to allow me to do some masked filtering. I >> need to apply multiple filters in multiple separate passes to take a big >> list and make it smaller and smaller with each filter pass until I have only >> the records I want remaining. >> >> If bit_and were available as an API call, this would be very simple. >> I would simply do a Find to get a VSet, then do more Finds using the >> previous VSet result as an "inSet" argument for the next filter pass. > > I think > > Table Methods = Calculated fields is an answer. > You make some Method, setup its formula which return e.g. True/false > Do > > set1 = fldMethod.FindValue( 1 ) > > Change method, and do next search. Aha! I think you are right :) And it looks like a very good answer! So help me understand this a bit better. Unfortunately other than mentioning that that calculated fields exist and noting how to define, them neither the Kernel nor the V4RB Reference provide any significant documentation describing calculated fields. When I define a calculated field in the API, and then perform a FindValue for example on that field, the interface is essentially taking my method and passing it over to the SQL engine somehow behind my back, getting an answer, and returning a VSet somehow? Or does Valentina have a native expression analyzer that can interpret the MethodText, render it into code for the calulcated field, and uses it for Find commands without going through SQL? > This will be not indexed searches. Of course, I'm not expecting them to be. I'm getting the speed from applying the searches sequentially and thus reducing the number of records that need to be searched each time. > For super fast SEARCH you can have several methods which are indexed. > In other words, you have pre-calculation in your hands. On 12/12/05 2:54 AM, "Ruslan Zasukhin" wrote: > >> So... Unless you have a recommendation as to something more efficient I >> might try, my only option at this time seems to be the "manually build a new >> table with a loop from a Vcursor" technique for every level of filter I want >> to use. > > About SQL. Why you cannot make SQL query which combine all your required > filters by AND > > WHERE bit_and(f1,..) AND bit_and() AND bit_and ... One answer is: Because my (possibly incorrect now that I think about it) assumption was that this would have the worst performance of all possible solutions because it would search the entire table 3 times. I can see now that it wouldn't have to but rather should do the exact sequential filtering I want if WHERE is implemented properly. Makes sense. But a better answer is: > ... I need to keep the > result of the first filter (the outside WHERE) around in memory so that I > can [later use] > one of many different second-level filters on this smaller list at any > time. So nesting WHERE statements does not get me what I need. In other words I want to get the result of the first WHERE bit_and(f1,...) and keep it around because I want to use that a the smaller set of records to search for many different second-level refinement searches. That make sense? From sunshine at public.kherson.ua Mon Dec 12 19:18:55 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 11:23:46 2005 Subject: Sequential filtering in SQL In-Reply-To: Message-ID: On 12/12/05 5:40 PM, "Ed Kleban" wrote: >> Table Methods = Calculated fields is an answer. >> You make some Method, setup its formula which return e.g. True/false >> Do >> >> set1 = fldMethod.FindValue( 1 ) >> >> Change method, and do next search. > > Aha! I think you are right :) And it looks like a very good answer! > So help me understand this a bit better. Unfortunately other than > mentioning that that calculated fields exist and noting how to define, them > neither the Kernel nor the V4RB Reference provide any significant > documentation describing calculated fields. I think exists text which describe WHEN you get benefits from them. Probably in Kernel.pdf > When I define a calculated field in the API, and then perform a FindValue > for example on that field, the interface is essentially taking my method and > passing it over to the SQL engine somehow behind my back, getting an answer, > and returning a VSet somehow? No, SQL engine is not used here. Only parser to parse formula and get nodes. Future when you use it million times, it looks like you work with already compiled c++ code. > Or does Valentina have a native expression analyzer that can interpret the > MethodText, render it into code for the calulcated field, and uses it for > Find commands without going through SQL? yes >> This will be not indexed searches. > > Of course, I'm not expecting them to be. I'm getting the speed from > applying the searches sequentially and thus reducing the number of records > that need to be searched each time. -- 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] From listmail1 at dsl.pipex.com Mon Dec 12 18:14:35 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Mon Dec 12 12:15:10 2005 Subject: UTF sorting and blank fields, and UTF-8 Message-ID: Hi all, I?m a long-time V4RB 1.9, finally making the switch to V4RB 2.0.5. So, I have a few questions :-) Firstly, is there a way I can get my SELECT statements to order with blank fields appearing *after* all other fields? For example, if I do "SELECT * from songstable order by album", I want everything with a non-blank VarChar in the 'album' table to come first in UTF sorted order, followed finally by all records with blank album fields. It seems that by default, blank fields come *first* when I sort in ascending order. A second question - my application reads the iTunes XML file, which is in UTF-8 format. What is the best way for me to write this to a V4RB database, and read it from a database, to avoid the REALbasic UTF-8 strings being converted to another encoding at any point? I want to keep it as quick as possible :-) I'm using REALbasic 5.5.5, V4RB 2.0.5, compiling for Mach-O only, local database only (no server). All of my existing code uses the Valentina class-based approach. Thanks for any help, Dave. From sunshine at public.kherson.ua Mon Dec 12 20:24:56 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 12:25:35 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: On 12/12/05 8:14 PM, "Dave Addey" wrote: Hi Dave, > I?m a long-time V4RB 1.9, finally making the switch to V4RB 2.0.5. So, I > have a few questions :-) > > Firstly, is there a way I can get my SELECT statements to order with blank > fields appearing *after* all other fields? For example, if I do "SELECT * > from songstable order by album", I want everything with a non-blank VarChar > in the 'album' table to come first in UTF sorted order, followed finally by > all records with blank album fields. > It seems that by default, blank fields come *first* when I sort in ascending > order. I see what you mean. Right now no. But you can add feature request into our Mantis. I believe we can easy implement this as property: Valentina.NullsAreFirst as Boolean = true > A second question - my application reads the iTunes XML file, which is in > UTF-8 format. What is the best way for me to write this to a V4RB database, > and read it from a database, to avoid the REALbasic UTF-8 strings being > converted to another encoding at any point? I want to keep it as quick as > possible :-) You just give V4RB UTF8 strings and get them back. Internally Valentina will convert them into UTF16. You cannot change this. Conversions task just 1% > I'm using REALbasic 5.5.5, V4RB 2.0.5, compiling for Mach-O only, local > database only (no server). All of my existing code uses the Valentina > class-based approach. -- 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] From listmail1 at dsl.pipex.com Mon Dec 12 18:30:20 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Mon Dec 12 12:30:51 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: Hi Ruslan, Thanks for the quick reply! > Right now no. But you can add feature request into our Mantis. > I believe we can easy implement this as property: > > Valentina.NullsAreFirst as Boolean = true I've just registered for the bug tracker, and will add a request. Thanks. > You just give V4RB UTF8 strings and get them back. > > Internally Valentina will convert them into UTF16. > You cannot change this. Conversions task just 1% Do I have to set the database StorageEncoding to "UTF-8" to get them back as UTF-8? Or will they come back as UTF-8 if I set them as UTF-8? Either is fine - I'll go with whichever is quicker :-) I'm happy to get them back as UTF-16 if it avoids the conversion, even if it is a quick conversion. Dave. From macsforever2000 at goodeast.com Mon Dec 12 11:31:29 2005 From: macsforever2000 at goodeast.com (Frank Schima) Date: Mon Dec 12 12:33:37 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: References: Message-ID: Hi guys, On Dec 12, 2005, at 11:24 AM, Ruslan Zasukhin wrote: > On 12/12/05 8:14 PM, "Dave Addey" wrote: > > Hi Dave, > >> I?m a long-time V4RB 1.9, finally making the switch to V4RB >> 2.0.5. So, I >> have a few questions :-) >> >> Firstly, is there a way I can get my SELECT statements to order >> with blank >> fields appearing *after* all other fields? For example, if I do >> "SELECT * >> from songstable order by album", I want everything with a non- >> blank VarChar >> in the 'album' table to come first in UTF sorted order, followed >> finally by >> all records with blank album fields. > >> It seems that by default, blank fields come *first* when I sort in >> ascending >> order. > > I see what you mean. > > Right now no. But you can add feature request into our Mantis. > I believe we can easy implement this as property: > > Valentina.NullsAreFirst as Boolean = true I already made this feature request some time ago: Best regards, Frank Schima I'm currently job hunting: From ayu8 at cdc.gov Mon Dec 12 13:35:25 2005 From: ayu8 at cdc.gov (Sims, John) Date: Mon Dec 12 12:50:20 2005 Subject: UTF sorting and blank fields, and UTF-8 Message-ID: > -----Original Message----- > From: valentina-bounces@lists.macserve.net > [mailto:valentina-bounces@lists.macserve.net] On Behalf Of > Ruslan Zasukhin > Sent: Monday, December 12, 2005 1:25 PM > To: valentina@lists.macserve.net > Subject: Re: UTF sorting and blank fields, and UTF-8 > > On 12/12/05 8:14 PM, "Dave Addey" wrote: > > Hi Dave, > > > I?m a long-time V4RB 1.9, finally making the switch to V4RB 2.0.5. > > So, I have a few questions :-) > > > > Firstly, is there a way I can get my SELECT statements to > order with > > blank fields appearing *after* all other fields? For > example, if I do > > "SELECT * from songstable order by album", I want everything with a > > non-blank VarChar in the 'album' table to come first in UTF sorted > > order, followed finally by all records with blank album fields. > > > It seems that by default, blank fields come *first* when I sort in > > ascending order. > > I see what you mean. > > Right now no. But you can add feature request into our Mantis. > I believe we can easy implement this as property: > > Valentina.NullsAreFirst as Boolean = true Hi Ruslan/Dave, I seem to recall I was able to do something like this before using a Method Field. I don't have any code in front of me but I think I created a method field that returned True if the length of the field was NULL (or length = 0, I can't remember). Then I queried it with something like: SELECT * FROM SongsTable ORDER BY IsBlank, Album Since "False" comes before "True", it put my blank records at the end. I'll see if I can find that code/DB tonight. -John From sunshine at public.kherson.ua Mon Dec 12 20:58:31 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 13:02:13 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: On 12/12/05 8:30 PM, "Dave Addey" wrote: >> You just give V4RB UTF8 strings and get them back. >> >> Internally Valentina will convert them into UTF16. >> You cannot change this. Conversions task just 1% > > Do I have to set the database StorageEncoding to "UTF-8" to get them back as > UTF-8? Or will they come back as UTF-8 if I set them as UTF-8? Either is > fine - I'll go with whichever is quicker :-) I'm happy to get them back as > UTF-16 if it avoids the conversion, even if it is a quick conversion. Just do NOTHING. V4RB communicate with REALbasic using UTF8 strings always. -- 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] From Ed at Kleban.com Mon Dec 12 13:02:47 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 13:03:20 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: Ok... I've made a subclass of VBinaryLink named CBLnkItemTms I have created an instance variable dbBLnkItmTms in the database class instance to hold the link, just as is done for tables, and I instantiated the link from a call in my database initialization method: dbTblItems = new CTblItems( self, "TblItems" ) dbTblTimeStamp = new CTblTimeStamp( self, "TblTimeStamp" ) dbBLnkItmTms = _ new CBLnkItmTms( dbTblItems, dbTblTimeStamp, "BLnkItmTms" ) I'm now attempting to define the constructor method, which I've also named CBLnkItmTms. Presumably, just as for contructors of VTable subclasses, all of the instance variables will initially get default values and it is up to my constructor to change any of those it cares about. So just like for a Vtable subclass constructor I include assignment of the linkname Sub CBLnkItmTms( TLeft as VTable, TRight as VTable, linkName as String ) self.name = linkName ... If I wanted to I could change the table owner for example since owner is inhereited by VBinaryLink from VLink: self.owner = someVTableOfMyChoice I also see that VBinaryLink inherits LeftType and RightType, so I could change those also if I want something different from the defaults. But what do I do with my two table arguments? Unfortunately the V4RB reference includes no documentation of the properties of VBinaryLink. Fortunately however, autocomplete allows me to cheat a bit and discover that I have access to all of the same property and method names inherited from VLink2 plus the constructor method VBinaryLink. I see there is a "Table" property. My guess is that this is always used for the LeftLink side, i.e. the so called parent. So I can assign: self.Table = TLeft But what do I do with "right"? One of the reasons that I'm beginning to like this approach is that I want to a) Simplify syntax and b) Cache my tables in one place so I can hand them directly to the FindLinked command without having to cache them in every routine that needs to use FindLinked. Thus I want to define for CBLnkItmTms: Function FindTimesForItem( anItemRid ) as VArraySet Function FindItemsForTime( aTmsRid ) as VArraySet Should I simply cache TRight in a new property I declare for CBlnkItmTms so that to implement the above to Find commands I can use: self.FindLinked( anRid, Tleft, TRight ) ? Or is there some mysterious undocumented, unnamed, or possibly inaccessible instance variable that VBinaryLink instances have that would allow me to use: self.undocumentedRightTablePropertyName = TRight If it is really the case that VBinaryLink instances do not retain the RightTable argument when the CreateBinaryLink or VBinaryLink methods are used, then I can well understand why there's yet another good reason that the FindLinked command requires the user to specify both tables... but I'll have more words to say on that in a separate email. self.name = tableName I've defined my constructor to have two arguments, just as is shown for VTable subclass constructors in the Classes Way examples. So, in my Database constructor I have: dbBLnkItemTms = new VBinaryLink( _ "BLnkItemTms", dbTblItems, dbTblTimeStamp, EVLinkType.kMany, EVLinkType.kOne ) From Ed at Kleban.com Mon Dec 12 13:29:01 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 13:29:33 2005 Subject: Sequential filtering in SQL In-Reply-To: Message-ID: On 12/12/05 11:18 AM, "Ruslan Zasukhin" wrote: > On 12/12/05 5:40 PM, "Ed Kleban" wrote: > >> When I define a calculated field in the API, and then perform a FindValue >> for example on that field, the interface is essentially taking my method and >> passing it over to the SQL engine somehow behind my back, getting an answer, >> and returning a VSet somehow? > > No, SQL engine is not used here. Only parser to parse formula and get nodes. > > Future when you use it million times, it looks like you work with already > compiled c++ code. > >> Or does Valentina have a native expression analyzer that can interpret the >> MethodText, render it into code for the calulcated field, and uses it for >> Find commands without going through SQL? > > yes > Ruslan, you make me so happy! This is exactly what I was looking for but couldn't find or figure out. Thanks! --Ed From listmail1 at dsl.pipex.com Mon Dec 12 19:34:48 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Mon Dec 12 13:35:23 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: Hi John, It sounds like a good plan! I can't get it to work, but I'm new to method fields - so if you can find the code you used, please do send it on :-) All the best, Dave. > From: "Sims, John" > Reply-To: Valentina Developers > Date: Mon, 12 Dec 2005 13:35:25 -0500 > To: Valentina Developers > Conversation: UTF sorting and blank fields, and UTF-8 > Subject: RE: UTF sorting and blank fields, and UTF-8 > >> -----Original Message----- >> From: valentina-bounces@lists.macserve.net >> [mailto:valentina-bounces@lists.macserve.net] On Behalf Of >> Ruslan Zasukhin >> Sent: Monday, December 12, 2005 1:25 PM >> To: valentina@lists.macserve.net >> Subject: Re: UTF sorting and blank fields, and UTF-8 >> >> On 12/12/05 8:14 PM, "Dave Addey" wrote: >> >> Hi Dave, >> >>> I?m a long-time V4RB 1.9, finally making the switch to V4RB 2.0.5. >>> So, I have a few questions :-) >>> >>> Firstly, is there a way I can get my SELECT statements to >> order with >>> blank fields appearing *after* all other fields? For >> example, if I do >>> "SELECT * from songstable order by album", I want everything with a >>> non-blank VarChar in the 'album' table to come first in UTF sorted >>> order, followed finally by all records with blank album fields. >> >>> It seems that by default, blank fields come *first* when I sort in >>> ascending order. >> >> I see what you mean. >> >> Right now no. But you can add feature request into our Mantis. >> I believe we can easy implement this as property: >> >> Valentina.NullsAreFirst as Boolean = true > > Hi Ruslan/Dave, > > I seem to recall I was able to do something like this before using a Method > Field. I don't have any code in front of me but I think I created a method > field that returned True if the length of the field was NULL (or length = 0, I > can't remember). Then I queried it with something like: > > SELECT * FROM SongsTable ORDER BY IsBlank, Album > > Since "False" comes before "True", it put my blank records at the end. I'll > see if I can find that code/DB tonight. > > -John > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From Ed at Kleban.com Mon Dec 12 13:38:39 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 13:39:12 2005 Subject: VLink Mess Re: FindLinkedSingle ? In-Reply-To: Message-ID: On 12/12/05 5:26 AM, "Ruslan Zasukhin" wrote: > On 12/12/05 7:42 AM, "Ed Kleban" wrote: > >> Nope. The list below won't work. I just couldn't figure out before "Why in >> the world would you pass TableA and TableB arguments to FindLinked when the >> Vlink already knows what the tables are?" >> >> The answer of course is that it doesn't know what the tables are. a >> VBinaryLink knows, but the FindLinked method has been defined to work on all >> types of Vlinks including Foreign Keys and presumably ObjectPtr links. > > Not only this reason. > > Mainly because with tables you can specify ORDER different than link it know Plus the fact that it makes it explicit in the call what tables are involved rather than relying on your memory of what's on left and what's on right in the declaration. Plus the fact that it allows the function to perform a check to make sure that the tables you reference are indeed part of the link and therefore offers an opportunity for a logic integrity check. I presume you're checking the tables that are specified some way. Yeah, as I say, sleep is a good thing. I thought up a lot of good reasons to shift back to reconsidering this as a good syntax. Especially after I realized late last night that this was a syntax for all Vlinks, or at least all V2Links, not just VBinaryLinks. It's taking a while, but I'm coming around. Not 100% there yet however. As it turns out I've also grown fonder, after some actual coding time this morning of kFromParentToChild and kFromChildToParen... and in the end it may be that my frustration was nothing more that this was completely undocumented in the manuals -- which is something I can certainly contribute some help on if I'm sufficiently pissed off. But I'm not 100% there on the recursive cases either yet. --Ed From Ed at Kleban.com Mon Dec 12 13:46:20 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 13:46:55 2005 Subject: FindLinked( inMaxCount as integer) Re: FindLinkedSingle ? In-Reply-To: Message-ID: Double Gack! There is no " inMaxCount as integer " argument to FindLinked either. Any reason why not? On 12/12/05 8:24 AM, "Ed Kleban" wrote: > > > > On 12/12/05 2:47 AM, "Ruslan Zasukhin" wrote: > >> On 12/12/05 7:19 AM, "Ed Kleban" wrote: >> >>> There's no FindLinkedSingle call in the API. >>> >>> Any reason why not? >> >> How you can be sure ? >> >> Aha, sure is only if you move in director to : 1 >> > > Yes. > > You can be sure if you've already done a lookup to determine count -- a > function which V2 DOES offer. > > You can be sure if you're keeping a separate count so you already know if > there is a link and how many links, but just not which link -- which I often > do so that I don't incur the overhead for a needless lookup. > > And you can be sure if the relation ship is 1:1 or M:1, as you point out. > > And the benefits are: > > 1) Cleaner syntax > > 2) Less call and return processing overhead > > 3) You immediately stop searching as soon as you find one. > > ... and leads to a whole separate question about BinaryLink Lookup and > Management efficiency that came up while sleeping last night and which I'll > include in a separate email later. > > From sunshine at public.kherson.ua Mon Dec 12 21:55:44 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 13:56:22 2005 Subject: FindLinked( inMaxCount as integer) Re: FindLinkedSingle ? In-Reply-To: Message-ID: On 12/12/05 9:46 PM, "Ed Kleban" wrote: > Double Gack! > > There is no " inMaxCount as integer " argument to FindLinked either. > > Any reason why not? No reasons InMaxCount and FindLinkedSingle() can go to feature request I think. -- 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] From listmail1 at dsl.pipex.com Mon Dec 12 20:00:54 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Mon Dec 12 14:01:27 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: I've been trying to get something like this to work, using: ArtistNameIsBlank = New VLong("ArtistNameIsBlank", EVFlag.fNone, "IF(LENGTH(Artist)=0, 0, 1)") ...but when I come to select with an ORDER BY of ArtistNameIsBlank, I get a Vexception of 'Field "ArtistNameIsBlank" does not exist'. Any ideas why? Dave. > From: Dave Addey > Reply-To: Valentina Developers > Date: Mon, 12 Dec 2005 19:34:48 +0000 > To: Valentina Developers > Conversation: UTF sorting and blank fields, and UTF-8 > Subject: Re: UTF sorting and blank fields, and UTF-8 > > Hi John, > > It sounds like a good plan! I can't get it to work, but I'm new to method > fields - so if you can find the code you used, please do send it on :-) > > All the best, > > Dave. > >> From: "Sims, John" >> Reply-To: Valentina Developers >> Date: Mon, 12 Dec 2005 13:35:25 -0500 >> To: Valentina Developers >> Conversation: UTF sorting and blank fields, and UTF-8 >> Subject: RE: UTF sorting and blank fields, and UTF-8 >> >>> -----Original Message----- >>> From: valentina-bounces@lists.macserve.net >>> [mailto:valentina-bounces@lists.macserve.net] On Behalf Of >>> Ruslan Zasukhin >>> Sent: Monday, December 12, 2005 1:25 PM >>> To: valentina@lists.macserve.net >>> Subject: Re: UTF sorting and blank fields, and UTF-8 >>> >>> On 12/12/05 8:14 PM, "Dave Addey" wrote: >>> >>> Hi Dave, >>> >>>> I?m a long-time V4RB 1.9, finally making the switch to V4RB 2.0.5. >>>> So, I have a few questions :-) >>>> >>>> Firstly, is there a way I can get my SELECT statements to >>> order with >>>> blank fields appearing *after* all other fields? For >>> example, if I do >>>> "SELECT * from songstable order by album", I want everything with a >>>> non-blank VarChar in the 'album' table to come first in UTF sorted >>>> order, followed finally by all records with blank album fields. >>> >>>> It seems that by default, blank fields come *first* when I sort in >>>> ascending order. >>> >>> I see what you mean. >>> >>> Right now no. But you can add feature request into our Mantis. >>> I believe we can easy implement this as property: >>> >>> Valentina.NullsAreFirst as Boolean = true >> >> Hi Ruslan/Dave, >> >> I seem to recall I was able to do something like this before using a Method >> Field. I don't have any code in front of me but I think I created a method >> field that returned True if the length of the field was NULL (or length = 0, >> I >> can't remember). Then I queried it with something like: >> >> SELECT * FROM SongsTable ORDER BY IsBlank, Album >> >> Since "False" comes before "True", it put my blank records at the end. I'll >> see if I can find that code/DB tonight. >> >> -John >> _______________________________________________ >> Valentina mailing list >> Valentina@lists.macserve.net >> http://lists.macserve.net/mailman/listinfo/valentina > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Mon Dec 12 22:17:05 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 14:17:43 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: On 12/12/05 10:00 PM, "Dave Addey" wrote: > I've been trying to get something like this to work, using: > > ArtistNameIsBlank = New VLong("ArtistNameIsBlank", EVFlag.fNone, > "IF(LENGTH(Artist)=0, 0, 1)") > > ...but when I come to select with an ORDER BY of ArtistNameIsBlank, I get a > Vexception of 'Field "ArtistNameIsBlank" does not exist'. Any ideas why? You have add above field into constructor of your table? And you create new db on disk ? May be some error was and field is not valid in fact. You can check db by vstudio -- 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] From sunshine at public.kherson.ua Mon Dec 12 22:32:00 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 14:32:40 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/12/05 9:02 PM, "Ed Kleban" wrote: > Unfortunately the V4RB reference includes no documentation of the properties > of VBinaryLink. Because there is nothing. All is inherited -- 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] From sunshine at public.kherson.ua Mon Dec 12 22:33:22 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 14:34:00 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/12/05 9:02 PM, "Ed Kleban" wrote: > I see there is a "Table" property. My guess is that this is always used for > the LeftLink side, i.e. the so called parent. So I can assign: > > self.Table = TLeft > > But what do I do with "right"? No! Ed, all this properties ARE described in the docs, but not in VBinaryLink class, but it its parents. Read there. -- 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] From Ed at Kleban.com Mon Dec 12 15:09:54 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 15:10:29 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/12/05 2:33 PM, "Ruslan Zasukhin" wrote: > On 12/12/05 9:02 PM, "Ed Kleban" wrote: > >> I see there is a "Table" property. My guess is that this is always used for >> the LeftLink side, i.e. the so called parent. So I can assign: >> >> self.Table = TLeft >> >> But what do I do with "right"? > > No! > > Ed, all this properties ARE described in the docs, but not in VBinaryLink > class, but it its parents. > > Read there. > > Been there, did that. Ah, I finally figured it out. Table is an array, not a property. Ok. From sunshine at public.kherson.ua Mon Dec 12 23:46:03 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Mon Dec 12 15:48:52 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/12/05 11:09 PM, "Ed Kleban" wrote: > Ah, I finally figured it out. Table is an array, not a property. Correctly to say: it is INDEXED property. Visual BASIC support this as built-in feature. I mean indexed properties. REALbasic also provide good syntax for this -- 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] From listmail1 at dsl.pipex.com Mon Dec 12 22:36:58 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Mon Dec 12 16:37:36 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: Hi Ruslan, Yes, this is in the constructor, and I have a new database created with this structure. It seems as though when I do "SELECT * FROM songs", the * doesn't return the ArtistNameIsBlank field as part of the results, and that this is why I cannot sort on this field. If I try "SELECT ArtistNameIsBlank FROM songs", then the method values are returned correctly. Is this the way it's meant to be? Are method fields not included in the results from "SELECT *"? Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Mon, 12 Dec 2005 22:17:05 +0200 > To: "valentina@lists.macserve.net" > Conversation: UTF sorting and blank fields, and UTF-8 > Subject: Re: UTF sorting and blank fields, and UTF-8 > > On 12/12/05 10:00 PM, "Dave Addey" wrote: > >> I've been trying to get something like this to work, using: >> >> ArtistNameIsBlank = New VLong("ArtistNameIsBlank", EVFlag.fNone, >> "IF(LENGTH(Artist)=0, 0, 1)") >> >> ...but when I come to select with an ORDER BY of ArtistNameIsBlank, I get a >> Vexception of 'Field "ArtistNameIsBlank" does not exist'. Any ideas why? > > You have add above field into constructor of your table? > > And you create new db on disk ? > > May be some error was and field is not valid in fact. > You can check db by vstudio > > > > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From listmail1 at dsl.pipex.com Mon Dec 12 22:38:01 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Mon Dec 12 16:38:36 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: I've just answered my own question by reading the SQL manual :-) I need to do "SELECT ** FROM songs". Sorry! Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Mon, 12 Dec 2005 22:17:05 +0200 > To: "valentina@lists.macserve.net" > Conversation: UTF sorting and blank fields, and UTF-8 > Subject: Re: UTF sorting and blank fields, and UTF-8 > > On 12/12/05 10:00 PM, "Dave Addey" wrote: > >> I've been trying to get something like this to work, using: >> >> ArtistNameIsBlank = New VLong("ArtistNameIsBlank", EVFlag.fNone, >> "IF(LENGTH(Artist)=0, 0, 1)") >> >> ...but when I come to select with an ORDER BY of ArtistNameIsBlank, I get a >> Vexception of 'Field "ArtistNameIsBlank" does not exist'. Any ideas why? > > You have add above field into constructor of your table? > > And you create new db on disk ? > > May be some error was and field is not valid in fact. > You can check db by vstudio > > > > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From BillMounce at Comcast.net Mon Dec 12 15:59:31 2005 From: BillMounce at Comcast.net (Bill Mounce) Date: Mon Dec 12 18:00:04 2005 Subject: [V4RB] Studio still crashes Message-ID: <31BDC5B8-F39C-4FCF-B151-75D455B04520@Comcast.net> Ruslin, I am on the latest version of Valentina, and when I try to change the type of a field from Boolean to Short, Studio crashes. Every time. When I tried to change just the name, the old name stays there. Nothing changes. I am on a deadline now and really need to be able to manipulate the database. Can you help? Bill Mounce From BillMounce at Comcast.net Mon Dec 12 16:05:29 2005 From: BillMounce at Comcast.net (Bill Mounce) Date: Mon Dec 12 18:06:50 2005 Subject: [V4RB] Boolean indexed? Message-ID: Also, I have a Boolean field that Studio says is index. I don't want it indexed, but can't find a way to turn it off. There is no option in the Property Inspector. Other boolean fields are not marked as indexed. The Schema Browser also lists the field as (Boolean):I:U. What does "U" stand for? Unique? Which of course it can't be because it is boolean. If I try to delete the field, I get this error: Kernel error: 0x23508 Primary key constraint violation occurred, table = "DICTIONARY", constraint name = "PH_HEBREW_DICTIONARY". I am not sure even how to set the Primary key. When I click on "Data Browser," Studio crashes. BIll From Ed at Kleban.com Mon Dec 12 22:39:30 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 12 22:40:02 2005 Subject: Sanity check - BinaryLink searches In-Reply-To: Message-ID: A quick sanity check to make sure I have things straight. If I create a BinaryLink between: TblCar.fldModel and TblOptions.fColor And add some some links: ( PintoRid, GreenRid ) ( PintoRid, BlueRid ) ( TarusRid, GreenRid ) ( TarusRid, BlackRid ) And then perform a FindLinked( PintoRid, fldModel, fColor ) Then it is necessarily the case that: 1) The search will be fast because FindLinked on a BinaryLink is always fast because searches on either the left field and searches on the right field are always performed using Indexes to perform something fast like a Binary search. 2) The list of Rids returned in the resulting VSet will necessarily be in the order that that I defined the links, and therefore: 3) Whatever sorting technique is used for creating the index is a stable sort that will preserve the relative order links that have the same Rid value for a given left field or a given right field. That correct? From j.peters at valentina-db.de Tue Dec 13 09:03:35 2005 From: j.peters at valentina-db.de (Jochen Peters) Date: Tue Dec 13 02:03:50 2005 Subject: [V4RB] Studio still crashes In-Reply-To: <20051213000005.E50223DF02C@edison.macserve.net> References: <20051213000005.E50223DF02C@edison.macserve.net> Message-ID: <4B196EC9-EDBC-4E16-87B4-F03F66DF0661@valentina-db.de> > Hi Bill, > I am on the latest version of Valentina, and when I try to change the > type of a field from Boolean to Short, Studio crashes. Every time. > When I tried to change just the name, the old name stays there. > Nothing changes. What database version are you using? 1.x or 2.x ? Do you use Mac or Windows version? > > I am on a deadline now and really need to be able to manipulate the > database. Can you help? In the current build the changing of types and names works fine. I guess i can upload the new build today later. -- Best regards, Jochen Peters PIIT GmbH ------------------------------------ http://www.valentina-db.de From sunshine at public.kherson.ua Tue Dec 13 10:27:06 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 02:27:47 2005 Subject: [V4RB] Boolean indexed? In-Reply-To: Message-ID: On 12/13/05 2:05 AM, "Bill Mounce" wrote: > Also, I have a Boolean field that Studio says is index. I don't want > it indexed, but can't find a way to turn it off. There is no option > in the Property Inspector. Other boolean fields are not marked as > indexed. Bill, Boolean field is special field. It do not have index at all in fact, but it works like it is indexed. So all boolean fields marked as indexed always. > The Schema Browser also lists the field as (Boolean):I:U. What does > "U" stand for? Unique? Which of course it can't be because it is > boolean. Yes, this is strange. > If I try to delete the field, I get this error: > > Kernel error: 0x23508 > Primary key constraint violation occurred, table = "DICTIONARY", > constraint name = "PH_HEBREW_DICTIONARY". > > I am not sure even how to set the Primary key. > > When I click on "Data Browser," Studio crashes. What version of VS you use ? I assume mac ? -- 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] From sunshine at public.kherson.ua Tue Dec 13 10:35:10 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 02:38:54 2005 Subject: Sanity check - BinaryLink searches In-Reply-To: Message-ID: On 12/13/05 6:39 AM, "Ed Kleban" wrote: Hi Ed, > A quick sanity check to make sure I have things straight. > > If I create a BinaryLink between: > TblCar.fldModel and TblOptions.fColor > > And add some some links: > > ( PintoRid, GreenRid ) > ( PintoRid, BlueRid ) > ( TarusRid, GreenRid ) > ( TarusRid, BlackRid ) > > > And then perform a FindLinked( PintoRid, fldModel, fColor ) > > Then it is necessarily the case that: > 1) The search will be fast because FindLinked on a BinaryLink is always fast > because searches on either the left field and searches on the right field > are always performed using Indexes to perform something fast like a Binary > search. yes > 2) The list of Rids returned in the resulting VSet will necessarily be in > the order that that I defined the links, Here points: you can get set as VBitSet, then no order at all. you an get set as ArraySet then yes. BUT !!!!! If you delete in table some record, and later add new, it will REUSE old RecID. So new record, can be inserted BEFORE older in list of binary link. > and therefore: > > 3) Whatever sorting technique is used for creating the index is a stable > sort that will preserve the relative order links that have the same Rid > value for a given left field or a given right field. Not clear. given left field -- cannot be linked 2 times with the same right recid -- 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] From listmail1 at dsl.pipex.com Tue Dec 13 09:33:03 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 13 03:33:37 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: Good news - I got this to work! But, selecting / sorting on the method field takes much longer, as the method has to be calculated on the fly. Is it possible to calculate the method field when the record is first created, rather than when it is selected? I could have a second field which I manually set when adding the record, but it's nicer to have Valentina do it using a method field if I can :-) Dave. > From: Dave Addey > Reply-To: Valentina Developers > Date: Mon, 12 Dec 2005 20:00:54 +0000 > To: Valentina Developers > Conversation: UTF sorting and blank fields, and UTF-8 > Subject: Re: UTF sorting and blank fields, and UTF-8 > > I've been trying to get something like this to work, using: > > ArtistNameIsBlank = New VLong("ArtistNameIsBlank", EVFlag.fNone, > "IF(LENGTH(Artist)=0, 0, 1)") > > ...but when I come to select with an ORDER BY of ArtistNameIsBlank, I get a > Vexception of 'Field "ArtistNameIsBlank" does not exist'. Any ideas why? > > Dave. > > >> From: Dave Addey >> Reply-To: Valentina Developers >> Date: Mon, 12 Dec 2005 19:34:48 +0000 >> To: Valentina Developers >> Conversation: UTF sorting and blank fields, and UTF-8 >> Subject: Re: UTF sorting and blank fields, and UTF-8 >> >> Hi John, >> >> It sounds like a good plan! I can't get it to work, but I'm new to method >> fields - so if you can find the code you used, please do send it on :-) >> >> All the best, >> >> Dave. >> >>> From: "Sims, John" >>> Reply-To: Valentina Developers >>> Date: Mon, 12 Dec 2005 13:35:25 -0500 >>> To: Valentina Developers >>> Conversation: UTF sorting and blank fields, and UTF-8 >>> Subject: RE: UTF sorting and blank fields, and UTF-8 >>> >>>> -----Original Message----- >>>> From: valentina-bounces@lists.macserve.net >>>> [mailto:valentina-bounces@lists.macserve.net] On Behalf Of >>>> Ruslan Zasukhin >>>> Sent: Monday, December 12, 2005 1:25 PM >>>> To: valentina@lists.macserve.net >>>> Subject: Re: UTF sorting and blank fields, and UTF-8 >>>> >>>> On 12/12/05 8:14 PM, "Dave Addey" wrote: >>>> >>>> Hi Dave, >>>> >>>>> I?m a long-time V4RB 1.9, finally making the switch to V4RB 2.0.5. >>>>> So, I have a few questions :-) >>>>> >>>>> Firstly, is there a way I can get my SELECT statements to >>>> order with >>>>> blank fields appearing *after* all other fields? For >>>> example, if I do >>>>> "SELECT * from songstable order by album", I want everything with a >>>>> non-blank VarChar in the 'album' table to come first in UTF sorted >>>>> order, followed finally by all records with blank album fields. >>>> >>>>> It seems that by default, blank fields come *first* when I sort in >>>>> ascending order. >>>> >>>> I see what you mean. >>>> >>>> Right now no. But you can add feature request into our Mantis. >>>> I believe we can easy implement this as property: >>>> >>>> Valentina.NullsAreFirst as Boolean = true >>> >>> Hi Ruslan/Dave, >>> >>> I seem to recall I was able to do something like this before using a Method >>> Field. I don't have any code in front of me but I think I created a method >>> field that returned True if the length of the field was NULL (or length = 0, >>> I >>> can't remember). Then I queried it with something like: >>> >>> SELECT * FROM SongsTable ORDER BY IsBlank, Album >>> >>> Since "False" comes before "True", it put my blank records at the end. I'll >>> see if I can find that code/DB tonight. >>> >>> -John >>> _______________________________________________ >>> Valentina mailing list >>> Valentina@lists.macserve.net >>> http://lists.macserve.net/mailman/listinfo/valentina >> >> >> _______________________________________________ >> Valentina mailing list >> Valentina@lists.macserve.net >> http://lists.macserve.net/mailman/listinfo/valentina > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Tue Dec 13 11:54:15 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 03:54:56 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: On 12/13/05 11:33 AM, "Dave Addey" wrote: > Good news - I got this to work! But, selecting / sorting on the method > field takes much longer, as the method has to be calculated on the fly. Mark it as indexed. Then will be faster > Is it possible to calculate the method field when the record is first created, > rather than when it is selected? I could have a second field which I manually > set when adding the record, but it's nicer to have Valentina do it using a > method field if I can :-) -- 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] From sunshine at public.kherson.ua Tue Dec 13 12:11:45 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 04:12:30 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: Message-ID: On 12/13/05 11:57 AM, "Ruslan Zasukhin" wrote: > On 12/13/05 11:45 AM, "Stan Busk" wrote: > >> I agree with that. There is no reason to continue supporting Mac OS 9. >> Let's do Mach-O, it is the best solution. >> >> Rright now creating a bundle with App Bundler and a PEF compile works >> fine as well. > >> I will likely start releasing my app that way. > > STOP !!! > > You say that you can create > > REALbasic PEF application, > > then create package with it + VComponents using App Bundler ? > > And this way work ?! > > Then WOW ! > > Can you give EXACT steps and URLs to download this ? Aha, so easy !!! * I have download this App Bundler application. * then compile some V4RB example as PEF application * start App Bundler, - point compiled app - point required files from VComponents and set for them destination /Contents/MacOS - point where to build result package - press BUILD BUNDLE button. DONE. Now we get MODERN Apple Style Package Example.app And it works! Stan! You have made great contribution for all us ! -- 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] From sunshine at public.kherson.ua Tue Dec 13 12:14:12 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 04:16:27 2005 Subject: Claudius, so we close 1088? Packages? Message-ID: Hi Claudius, Well, since we have now way to build packages with V4RB 2.x I think we can close issue 1088, right ? -- 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] From maxprog at mac.com Tue Dec 13 11:38:11 2005 From: maxprog at mac.com (Stan Busk) Date: Tue Dec 13 04:38:48 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: References: Message-ID: <0EE84B1F-DA77-4E04-B35E-14C9AC9790F5@mac.com> Thanks to Thomas Reed for writing such a valuable tool :) It is really great and it comes with sources as well (RB Project) so anybody can customize it for its own needs. > Stan! You have made great contribution for all us ! From sunshine at public.kherson.ua Tue Dec 13 12:51:28 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 04:52:14 2005 Subject: [V4RB] Vcomponents in package. Solution ?! In-Reply-To: <32917315-2699-4424-A847-1FC78E14D301@mac.com> Message-ID: On 12/13/05 12:33 PM, "Stan Busk" wrote: > Hi, > > Yes, it works fine here. > I use App Bundler: http://www.bitjuggler.com/products/appbundler/ > It is a great tools made with RB and it includes the sources. > > 1.- I launch the app. On the first panel 'Main files' I set where my > compiled app is located. > 2.- On second panel 'Other files' I add all the VComponents items and > the vresources folder, setting each Destination to 'Contents/MacOS/'. > 3.- I give a name to my bundle on third panel 'Structure'. > 4.- Press the 'Build Bundle' button. > > To test I removed the VComponents folder from CFMSupport on my > system. I launch my app, it works. > I also copied the bundled app to a G5 with Mac OS X.3.9 where > Valentina has never been installed. It works. Yes Stan, it really works! Great! -- 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] From sunshine at public.kherson.ua Tue Dec 13 12:52:27 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 04:53:08 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: <0EE84B1F-DA77-4E04-B35E-14C9AC9790F5@mac.com> Message-ID: On 12/13/05 12:38 PM, "Stan Busk" wrote: > > Thanks to Thomas Reed for writing such a valuable tool :) > It is really great and it comes with sources as well (RB Project) so > anybody can customize it for its own needs. > >> Stan! You have made great contribution for all us ! And it seems it is scriptable via Apple Script -- 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] From listmail1 at dsl.pipex.com Tue Dec 13 13:31:13 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 13 07:31:48 2005 Subject: Foreign Key links - "Restrict is specified" error Message-ID: Hi all, I?m trying to get a Foreign Key link to work, to link together a list of Tracks and a list of Playlists (read in from iTunes). But I?m having some problems. Here?s the background. I?m reading in the iTunes XML library. I get the Tracks first, then the Playlists, with each of their PlaylistTracks (showing how tracks are used in a playlist). Each Track has a unique integer ID, and so does each Playlist. I have a third table, ?vPlaylistTracks?, which links Playlists and Tracks together. In the constructor of both my vTracks table and my vPlaylists I have a call to create the UniqueID: UniqueID = New VULong("UniqueID", EVFlag.fUnique + EVFlag.fIndexed) (Both tables have a property called ?UniqueID as VULong?) In my joining table, I have: Name = "PlaylistTracks" PlaylistUniqueIDPtr = New VULong("PlaylistUniqueIDPtr", EVFlag.fIndexed + EVFlag.fNullable) TrackUniqueIDPtr = New VULong("TrackUniqueIDPtr", EVFlag.fIndexed + EVFlag.fNullable) In my Database constructor, I have: VDatabase(EVStorageType.kDefault) vTracks = New vTracksTable vPlaylists = New vPlaylistsTable vPlaylistTracks = New vPlaylistTracksTable vPT_PlaylistUniqueIDLink = CreateForeignKeyLink("PT_PlaylistUniqueIDLink", vPlaylists.UniqueID, vPlaylistTracks.PlaylistUniqueIDPtr, EVOnDelete.kSetNull, EVOnUpdate.kCascade, false) vPT_TrackUniqueIDLink = CreateForeignKeyLink("PT_TrackUniqueIDLink", vTracks.UniqueID, vPlaylistTracks.TrackUniqueIDPtr, EVOnDelete.kSetNull, EVOnUpdate.kCascade, false) I can add Tracks and Playlists to their tables with no problems. But when I try and add a PlaylistTrack to the vPlaylistTracks table, I get an error. Here?s what I am doing: Dim newRecID as integer LibraryDB3.vPlaylistTracks.SetBlank(EVValueAccess.forAdd) LibraryDB3.vPlaylistTracks.PlaylistUniqueIDPtr.Value = inPlaylistID LibraryDB3.vPlaylistTracks.TrackUniqueIDPtr.Value = inTrackID newRecID = LibraryDB3.vPlaylistTracks.AddRecord The AddRecord call raises a Vexception error: ?Restrict is specified. Dropping is un available till constraints exist.? What does this error mean? What have I done wrong? Dave. From IvanSmahin at public.kherson.ua Tue Dec 13 15:57:51 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Tue Dec 13 07:58:23 2005 Subject: Foreign Key links - "Restrict is specified" error In-Reply-To: References: Message-ID: <361290409.20051213155751@public.kherson.ua> Hello Dave, Tuesday, December 13, 2005, 3:31:13 PM, you wrote: DA> Hi all, DA> I?m trying to get a Foreign Key link to work, to link together a list of DA> Tracks and a list of Playlists (read in from iTunes). But I?m having some DA> problems. Here?s the background. DA> I?m reading in the iTunes XML library. I get the Tracks first, then the DA> Playlists, with each of their PlaylistTracks (showing how tracks are used in DA> a playlist). DA> Each Track has a unique integer ID, and so does each Playlist. I have a DA> third table, ?vPlaylistTracks?, which links Playlists and Tracks together. DA> In the constructor of both my vTracks table and my vPlaylists I have a call DA> to create the UniqueID: DA> UniqueID = New VULong("UniqueID", EVFlag.fUnique + EVFlag.fIndexed) DA> (Both tables have a property called ?UniqueID as VULong?) DA> DA> In my joining table, I have: DA> Name = "PlaylistTracks" DA> DA> PlaylistUniqueIDPtr = New VULong("PlaylistUniqueIDPtr", EVFlag.fIndexed + DA> EVFlag.fNullable) DA> TrackUniqueIDPtr = New VULong("TrackUniqueIDPtr", EVFlag.fIndexed + DA> EVFlag.fNullable) DA> DA> In my Database constructor, I have: DA> VDatabase(EVStorageType.kDefault) DA> DA> vTracks = New vTracksTable DA> vPlaylists = New vPlaylistsTable DA> vPlaylistTracks = New vPlaylistTracksTable DA> DA> vPT_PlaylistUniqueIDLink = DA> CreateForeignKeyLink("PT_PlaylistUniqueIDLink", DA> vPlaylists.UniqueID, vPlaylistTracks.PlaylistUniqueIDPtr, DA> EVOnDelete.kSetNull, EVOnUpdate.kCascade, false) DA> vPT_TrackUniqueIDLink = CreateForeignKeyLink("PT_TrackUniqueIDLink", DA> vTracks.UniqueID, vPlaylistTracks.TrackUniqueIDPtr, EVOnDelete.kSetNull, DA> EVOnUpdate.kCascade, false) DA> DA> I can add Tracks and Playlists to their tables with no problems. But when I DA> try and add a PlaylistTrack to the vPlaylistTracks table, I get an error. DA> Here?s what I am doing: DA> Dim newRecID as integer DA> LibraryDB3.vPlaylistTracks.SetBlank(EVValueAccess.forAdd) DA> LibraryDB3.vPlaylistTracks.PlaylistUniqueIDPtr.Value = inPlaylistID DA> LibraryDB3.vPlaylistTracks.TrackUniqueIDPtr.Value = inTrackID DA> newRecID = LibraryDB3.vPlaylistTracks.AddRecord DA> DA> The AddRecord call raises a Vexception error: DA> ?Restrict is specified. Dropping is un available till constraints exist.? DA> What does this error mean? What have I done wrong? It should be constraint violation error with more appropriate message. I will fix it ASAP. But it should not be risen if both keys exist. Are you sure inPlaylistID and inTrackID presented at the keys' tables? -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From listmail1 at dsl.pipex.com Tue Dec 13 14:02:06 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 13 08:02:39 2005 Subject: Foreign Key links - "Restrict is specified" error In-Reply-To: <361290409.20051213155751@public.kherson.ua> Message-ID: Hi Ivan, > It should be constraint violation error with more appropriate message. > I will fix it ASAP. But it should not be risen if both keys exist. > > Are you sure inPlaylistID and inTrackID presented at the keys' tables? Drat - it was that simple. I thought I had added the Playlist key to the table before trying to add the PlaylistTrack, but in fact I hadn't. Sorry - that was a simple mistake on my part. A more descriptive error message would be good, however :-) Thanks! Dave. > From: Ivan Smahin > Organization: Home > Reply-To: Valentina Developers > Date: Tue, 13 Dec 2005 15:57:51 +0200 > To: Valentina Developers > Subject: Re: Foreign Key links - "Restrict is specified" error > > Hello Dave, > > Tuesday, December 13, 2005, 3:31:13 PM, you wrote: > > DA> Hi all, > > DA> I?m trying to get a Foreign Key link to work, to link together a list of > DA> Tracks and a list of Playlists (read in from iTunes). But I?m having some > DA> problems. Here?s the background. > > DA> I?m reading in the iTunes XML library. I get the Tracks first, then the > DA> Playlists, with each of their PlaylistTracks (showing how tracks are used > in > DA> a playlist). > > DA> Each Track has a unique integer ID, and so does each Playlist. I have a > DA> third table, ?vPlaylistTracks?, which links Playlists and Tracks together. > > DA> In the constructor of both my vTracks table and my vPlaylists I have a > call > DA> to create the UniqueID: > > DA> UniqueID = New VULong("UniqueID", EVFlag.fUnique + EVFlag.fIndexed) > > DA> (Both tables have a property called ?UniqueID as VULong?) > DA> > DA> In my joining table, I have: > > DA> Name = "PlaylistTracks" > DA> > DA> PlaylistUniqueIDPtr = New VULong("PlaylistUniqueIDPtr", EVFlag.fIndexed > + > DA> EVFlag.fNullable) > DA> TrackUniqueIDPtr = New VULong("TrackUniqueIDPtr", EVFlag.fIndexed + > DA> EVFlag.fNullable) > DA> > > DA> In my Database constructor, I have: > > DA> VDatabase(EVStorageType.kDefault) > DA> > DA> vTracks = New vTracksTable > DA> vPlaylists = New vPlaylistsTable > DA> vPlaylistTracks = New vPlaylistTracksTable > DA> > DA> vPT_PlaylistUniqueIDLink = > DA> CreateForeignKeyLink("PT_PlaylistUniqueIDLink", > DA> vPlaylists.UniqueID, vPlaylistTracks.PlaylistUniqueIDPtr, > DA> EVOnDelete.kSetNull, EVOnUpdate.kCascade, false) > DA> vPT_TrackUniqueIDLink = CreateForeignKeyLink("PT_TrackUniqueIDLink", > DA> vTracks.UniqueID, vPlaylistTracks.TrackUniqueIDPtr, EVOnDelete.kSetNull, > DA> EVOnUpdate.kCascade, false) > DA> > DA> I can add Tracks and Playlists to their tables with no problems. But when > I > DA> try and add a PlaylistTrack to the vPlaylistTracks table, I get an error. > > DA> Here?s what I am doing: > > DA> Dim newRecID as integer > DA> LibraryDB3.vPlaylistTracks.SetBlank(EVValueAccess.forAdd) > DA> LibraryDB3.vPlaylistTracks.PlaylistUniqueIDPtr.Value = inPlaylistID > DA> LibraryDB3.vPlaylistTracks.TrackUniqueIDPtr.Value = inTrackID > DA> newRecID = LibraryDB3.vPlaylistTracks.AddRecord > DA> > DA> The AddRecord call raises a Vexception error: > > DA> ?Restrict is specified. Dropping is un available till constraints exist.? > > DA> What does this error mean? What have I done wrong? > > It should be constraint violation error with more appropriate message. > I will fix it ASAP. But it should not be risen if both keys exist. > > Are you sure inPlaylistID and inTrackID presented at the keys' tables? > > > -- > Best regards, > Ivan mailto:IvanSmahin@public.kherson.ua > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From Ed at Kleban.com Tue Dec 13 08:26:52 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 13 08:27:26 2005 Subject: Sanity check - BinaryLink searches In-Reply-To: Message-ID: On 12/13/05 2:35 AM, "Ruslan Zasukhin" wrote: > On 12/13/05 6:39 AM, "Ed Kleban" wrote: > > Hi Ed, > >> A quick sanity check to make sure I have things straight. >> >> If I create a BinaryLink between: >> TblCar.fldModel and TblOptions.fColor >> >> And add some some links: >> >> ( PintoRid, GreenRid ) >> ( PintoRid, BlueRid ) >> ( TarusRid, GreenRid ) >> ( TarusRid, BlackRid ) >> >> >> And then perform a FindLinked( PintoRid, fldModel, fColor ) >> >> Then it is necessarily the case that: > >> 1) The search will be fast because FindLinked on a BinaryLink is always fast >> because searches on either the left field and searches on the right field >> are always performed using Indexes to perform something fast like a Binary >> search. > > yes > Great >> 2) The list of Rids returned in the resulting VSet will necessarily be in >> the order that that I defined the links, > > Here points: > you an get set as ArraySet then yes. Super > you can get set as VBitSet, then no order at all. Are you sure? That does not make sense. Surely if I use a VBitSet then the results are necessarily ordered by physical recId. That's fundamental to the way VBitSet is defined in the kernel documentation. I may have to create and use a Sequencer to iterate over the BitSet and retrieve the ordered list of rids, how surely the results represented by a VBitSet are ordered. > > BUT !!!!! > > If you delete in table some record, and later add new, it will REUSE old > RecID. So new record, can be inserted BEFORE older in list of binary link. Aha! Good point. I had not considered that, but no matter since I never delete records. >> and therefore: >> >> 3) Whatever sorting technique is used for creating the index is a stable >> sort that will preserve the relative order links that have the same Rid >> value for a given left field or a given right field. > > Not clear. My words are not clear to you? Or your understanding of how the interals work is not clear? My understanding is that if (1) is true, and (2) is true, then whether intended or not by your implementation, by virute of the definition of "stable" sort (3) must be true. To quote Charles Yeomans ArraySorter documentation: "A stable sort is one that preserves the relative order of items with equal keys. Suppose that you sort an array of objects first on one property, then on a second. A stable sort will preserve the first sort order when it performs the second." In this context, the records of a table are inherently first sorted by order of links added to the Links table. > given left field -- cannot be linked 2 times with the same right recid > That scares me. I do not understand. Are you saying that if I have a RECURSIVE link, then everything we discussed above is true for a MANY:MANY table If I use kFromChildToParent, but NOT If I use kFromParentToChild? Why would that be? I presume that when FindLinked is called the effective sort order is 1st by by RecId for the corresponding field, and secondly by order of entry in Link table (i.e. LinkRid ). If that is true, then it should not matter whether you have 1:1, 1:M, M:1, or M:M. If that is not true, then I am confused. Thanks! --Ed From sunshine at public.kherson.ua Tue Dec 13 16:34:43 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 08:35:23 2005 Subject: Sanity check - BinaryLink searches In-Reply-To: Message-ID: On 12/13/05 4:26 PM, "Ed Kleban" wrote: >> you can get set as VBitSet, then no order at all. > > Are you sure? That does not make sense. I am sure. Just think. BitSet cannot keep order of records. This point is mentioned in kernel.pdf > Surely if I use a VBitSet then the > results are necessarily ordered by physical recId. No. you just get set of bits: 0 1 0 1 0 0 0 1 > That's fundamental to > the way VBitSet is defined in the kernel documentation. I may have to > create and use a Sequencer to iterate over the BitSet and retrieve the > ordered list of rids, how surely the results represented by a VBitSet are > ordered. -- 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] From sunshine at public.kherson.ua Tue Dec 13 16:37:37 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 08:38:17 2005 Subject: Sanity check - BinaryLink searches In-Reply-To: Message-ID: On 12/13/05 4:26 PM, "Ed Kleban" wrote: > "A stable sort is one that preserves the relative order of items with equal > keys. Suppose that you sort an array of objects first on one property, then > on a second. A stable sort will preserve the first sort order when it > performs the second." > > In this context, the records of a table are inherently first sorted by order > of links added to the Links table. I afraid you think to hard here. you have LEFT recid 1 which is linked to recids from RIGHT 3, 5, 7, 9 Point. So you have 1 linked to { 3, 5, 7, 9 } NEVER mind order of adding records into RIGHT TABLE. NEVER mind order of links establishing. You always have 1 linked to { 3, 5, 7, 9 } -- 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] From Ed at Kleban.com Tue Dec 13 08:56:18 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 13 08:56:51 2005 Subject: Sanity check - BinaryLink searches In-Reply-To: Message-ID: On 12/13/05 8:37 AM, "Ruslan Zasukhin" wrote: > On 12/13/05 4:26 PM, "Ed Kleban" wrote: > >> "A stable sort is one that preserves the relative order of items with equal >> keys. Suppose that you sort an array of objects first on one property, then >> on a second. A stable sort will preserve the first sort order when it >> performs the second." >> >> In this context, the records of a table are inherently first sorted by order >> of links added to the Links table. > > I afraid you think to hard here. I usually do :) > you have LEFT recid 1 which is linked to recids from RIGHT 3, 5, 7, 9 > > Point. > > So you have > > 1 linked to { 3, 5, 7, 9 } > > NEVER mind order of adding records into RIGHT TABLE. > NEVER mind order of links establishing. > > You always have > > 1 linked to { 3, 5, 7, 9 } > Sure, but I just want to make sure that if I have a MANY:MANY link and I never delete records, and: I link LeftRid #1 to { 3, 9, 5, 8, 7 } IN THAT ORDER and I link { 1, 9, 6, 3, 2 } to rightRid #7 IN THAT ORDER That when I do a FindLinked( 1, left, right ) I will get an arrayset with: { 3, 9, 5, 8, 7 } IN THAT ORDER And when I do a FindLinked( 7, right, left ) I will get an arrayset with: { 1, 9, 6, 3, 2 } IN THAT ORDER And everything I read in your reply suggested, "Yes, this is the case" Until I read: > given left field -- cannot be linked 2 times with the same right recid Oh wait, you say "SAME right RecId"... Ah, I see now. Yes. I agree. I will never do this. And if I do it won't matter. Ok. Enough said I think. Thanks for the clarification. --Ed I will get an Arrayset with { 3, 9, 5, 8, 7 } in that From sunshine at public.kherson.ua Tue Dec 13 17:41:36 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 09:42:21 2005 Subject: BinaryLink that keep ORDER In-Reply-To: Message-ID: On 12/13/05 4:56 PM, "Ed Kleban" wrote: > Sure, but I just want to make sure that if I have a MANY:MANY link and I > never delete records, and: > > I link LeftRid #1 to { 3, 9, 5, 8, 7 } IN THAT ORDER > and I link { 1, 9, 6, 3, 2 } to rightRid #7 IN THAT ORDER > > That when I do a FindLinked( 1, left, right ) I will get an arrayset with: > { 3, 9, 5, 8, 7 } IN THAT ORDER No, you will get { 3, 5, 7, 8, 9 } > And when I do a FindLinked( 7, right, left ) I will get an arrayset with: > { 1, 9, 6, 3, 2 } IN THAT ORDER No, you will get { 1, 2, 3, 6, 9 } > And everything I read in your reply suggested, "Yes, this is the case" No. BinaryLink is like an index. So it keep list of recIDs sorted by values, To do binary search. --------------------- Ed, remember few days ago, I have start talk about BinaryLink that keep ORDER. They will do what you want. HOW they will do this, I do not know yet, because I see at least 3 ways to implement, each have own props/cons. -- 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] From jda at his.com Tue Dec 13 10:59:47 2005 From: jda at his.com (jda) Date: Tue Dec 13 10:00:24 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: <0EE84B1F-DA77-4E04-B35E-14C9AC9790F5@mac.com> References: <0EE84B1F-DA77-4E04-B35E-14C9AC9790F5@mac.com> Message-ID: >Thanks to Thomas Reed for writing such a valuable tool :) >It is really great and it comes with sources as well (RB Project) so >anybody can customize it for its own needs. > I tried this with my app, and it worked, too. Magic! Thanks, Stan. But Ruslan, it still looks like Valentina defaults to the VComponents folder, not the individual elements in the bundle. There is still the problem, then, of conflicts when users have older (or newer) versions of Valentina installed in CFMSupport. Can this be fixed (Mantis #1090). Jon From BillMounce at Comcast.net Tue Dec 13 08:03:56 2005 From: BillMounce at Comcast.net (Bill Mounce) Date: Tue Dec 13 10:04:29 2005 Subject: [V4RB] Studio still crashes In-Reply-To: <4B196EC9-EDBC-4E16-87B4-F03F66DF0661@valentina-db.de> References: <20051213000005.E50223DF02C@edison.macserve.net> <4B196EC9-EDBC-4E16-87B4-F03F66DF0661@valentina-db.de> Message-ID: Sorry. I am on Mac using 2.x. I would love a new build. My guess is that my database became corrupted and that is why Studio is crashing. Bill On Dec 13, 2005, at 12:03 AM, Jochen Peters wrote: >> > > Hi Bill, > >> I am on the latest version of Valentina, and when I try to change the >> type of a field from Boolean to Short, Studio crashes. Every time. >> When I tried to change just the name, the old name stays there. >> Nothing changes. > What database version are you using? 1.x or 2.x ? > Do you use Mac or Windows version? > > >> >> I am on a deadline now and really need to be able to manipulate the >> database. Can you help? > > In the current build the changing of types and names works fine. I > guess i > can upload the new build today later. > > > > > -- > Best regards, > Jochen Peters > PIIT GmbH > > ------------------------------------ > http://www.valentina-db.de > > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From BillMounce at Comcast.net Tue Dec 13 08:05:47 2005 From: BillMounce at Comcast.net (Bill Mounce) Date: Tue Dec 13 10:06:21 2005 Subject: [V4RB] Boolean indexed? In-Reply-To: References: Message-ID: <15884C80-5275-4674-9011-120861C8F057@Comcast.net> Ruslan, Yes, I am on the latest version of Studio on the Mac. I have a second boolean field that is not marked as indexed, and if I create a brand new database, none of the boolean fields are marked as indexed. Bill Bill On Dec 13, 2005, at 12:27 AM, Ruslan Zasukhin wrote: > On 12/13/05 2:05 AM, "Bill Mounce" wrote: > >> Also, I have a Boolean field that Studio says is index. I don't want >> it indexed, but can't find a way to turn it off. There is no option >> in the Property Inspector. Other boolean fields are not marked as >> indexed. > > Bill, Boolean field is special field. It do not have index at all > in fact, > but it works like it is indexed. So all boolean fields marked as > indexed > always. > >> The Schema Browser also lists the field as (Boolean):I:U. What does >> "U" stand for? Unique? Which of course it can't be because it is >> boolean. > > Yes, this is strange. > >> If I try to delete the field, I get this error: >> >> Kernel error: 0x23508 >> Primary key constraint violation occurred, table = "DICTIONARY", >> constraint name = "PH_HEBREW_DICTIONARY". >> >> I am not sure even how to set the Primary key. >> >> When I click on "Data Browser," Studio crashes. > > What version of VS you use ? > > I assume mac ? > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Tue Dec 13 18:05:45 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 10:06:26 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: Message-ID: On 12/13/05 5:59 PM, "jda" wrote: >> Thanks to Thomas Reed for writing such a valuable tool :) >> It is really great and it comes with sources as well (RB Project) so >> anybody can customize it for its own needs. >> > > I tried this with my app, and it worked, too. Magic! Thanks, Stan. > > But Ruslan, it still looks like Valentina defaults to the VComponents > folder, not the individual elements in the bundle. There is still the > problem, then, of conflicts when users have older (or newer) versions > of Valentina installed in CFMSupport. Can this be fixed (Mantis > #1090). How you can see this ? -- 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] From ohmitou at wanadoo.fr Tue Dec 13 20:06:33 2005 From: ohmitou at wanadoo.fr (Thierry Nauze) Date: Tue Dec 13 10:07:23 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: References: <0EE84B1F-DA77-4E04-B35E-14C9AC9790F5@mac.com> Message-ID: Le 13 d?c. 05 ? 19:59, jda a ?crit : >> Thanks to Thomas Reed for writing such a valuable tool :) >> It is really great and it comes with sources as well (RB Project) >> so anybody can customize it for its own needs. >> > > I tried this with my app, and it worked, too. Magic! Thanks, Stan. > > But Ruslan, it still looks like Valentina defaults to the > VComponents folder, not the individual elements in the bundle. > There is still the problem, then, of conflicts when users have > older (or newer) versions of Valentina installed in CFMSupport. Can > this be fixed (Mantis #1090). Hello, It is effectively a VERY SERIOUS problem: I have just compiled the same application (Doctor DB.rb, example of Valentina). - on my portable with V4RB 2.05 - on my basic salary with V4RB 2.1B13 Each works on the machine which compiled it and does not work on the other one. Disturbing! Thierry NAUZE Saint-Denis de la R?union From jda at his.com Tue Dec 13 11:11:12 2005 From: jda at his.com (jda) Date: Tue Dec 13 10:11:46 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: References: Message-ID: >On 12/13/05 5:59 PM, "jda" wrote: > >>> Thanks to Thomas Reed for writing such a valuable tool :) >>> It is really great and it comes with sources as well (RB Project) so >>> anybody can customize it for its own needs. >>> >> >> I tried this with my app, and it worked, too. Magic! Thanks, Stan. >> >> But Ruslan, it still looks like Valentina defaults to the VComponents >> folder, not the individual elements in the bundle. There is still the >> problem, then, of conflicts when users have older (or newer) versions >> of Valentina installed in CFMSupport. Can this be fixed (Mantis >> #1090). > >How you can see this ? > Something of a guess but: 1. Make the bundle. 2. It works. 3. Remove one of the Valentina files from the bundle. 4. Still works! 5. Remove the same file from VComponents (now missing in BOTH bundle and VComponents). 6. Doesn't run any more. This is exactly the same behavior I found before with a regular folder (not a bundle) -- Valentina uses VComponents in CFMSupport IF PRESENT, and only uses the files in the same folder as the app if they are not found there. Jon From sunshine at public.kherson.ua Tue Dec 13 18:11:13 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 10:11:55 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: Message-ID: On 12/13/05 6:06 PM, "Thierry Nauze" wrote: Hi Thierry, > It is effectively a VERY SERIOUS problem: I have just compiled the > same application (Doctor DB.rb, example of Valentina). > - on my portable with V4RB 2.05 > - on my basic salary with V4RB 2.1B13 > > Each works on the machine which compiled it and does not work on the > other one. > > Disturbing! What exactly you have move to other computer? Describe folder and its contents please -- 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] From sunshine at public.kherson.ua Tue Dec 13 18:12:13 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 10:12:57 2005 Subject: [V4RB] Boolean indexed? In-Reply-To: <15884C80-5275-4674-9011-120861C8F057@Comcast.net> Message-ID: On 12/13/05 6:05 PM, "Bill Mounce" wrote: > Ruslan, > > Yes, I am on the latest version of Studio on the Mac. I have a second > boolean field that is not marked as indexed, and if I create a brand > new database, none of the boolean fields are marked as indexed. Jochen, You need check this. Sounds strange. All Boolean should be marked as indexed, And they cannot be unique never. -- 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] From sunshine at public.kherson.ua Tue Dec 13 18:15:15 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 10:15:56 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: Message-ID: On 12/13/05 6:11 PM, "jda" wrote: > Something of a guess but: > > 1. Make the bundle. > 2. It works. > 3. Remove one of the Valentina files from the bundle. > 4. Still works! This is expected. MacOS try find dlls in - app folder, if not found then - in system folder SFMSupport. > 5. Remove the same file from VComponents (now missing in BOTH bundle > and VComponents). Right. Again as expected. > 6. Doesn't run any more. right > This is exactly the same behavior I found before with a regular > folder (not a bundle) -- Valentina uses VComponents in CFMSupport IF > PRESENT, and only uses the files in the same folder as the app if > they are not found there. Here you describe OTHER prodble Jon. Here you say that AT FIRST Valentina search for CFMSupport, And in second at app folder. This sounds strange, because this is MAC OS do: -- at first APP folder -- second system. >From small area to bigger... -- 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] From jda at his.com Tue Dec 13 11:20:28 2005 From: jda at his.com (jda) Date: Tue Dec 13 10:21:02 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: References: Message-ID: > > >Here you say that AT FIRST Valentina search for CFMSupport, >And in second at app folder. > >This sounds strange, because this is MAC OS do: > -- at first APP folder > -- second system. > >From small area to bigger... > But that's not what is happening. Test this yourself: 1. Compile an app with the latest 2.1 beta. 2. Remove the latest 2.1 beta VComponents FROM CFMSupport 3. Move an older version of VComponents (any older version) into CFMSuport 4. Does the app still run? If not, it means Valentina is using the contents of CFMSupport, even though the newer files are available in the bundle. This is the problem I ran into before, and reported in but #1090. Jon From sunshine at public.kherson.ua Tue Dec 13 18:26:16 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 13 10:26:57 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: Message-ID: On 12/13/05 6:20 PM, "jda" wrote: > But that's not what is happening. Test this yourself: > > 1. Compile an app with the latest 2.1 beta. > 2. Remove the latest 2.1 beta VComponents FROM CFMSupport > 3. Move an older version of VComponents (any older version) into CFMSuport > 4. Does the app still run? If not, it means Valentina is using the > contents of CFMSupport, even though the newer files are available in > the bundle. > > This is the problem I ran into before, and reported in but #1090. Okay, I will test this. -- 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] From ohmitou at wanadoo.fr Tue Dec 13 20:48:47 2005 From: ohmitou at wanadoo.fr (Thierry Nauze) Date: Tue Dec 13 10:49:22 2005 Subject: [V4RB] Vcomponents in package. Solution ? - YES !!! In-Reply-To: References: Message-ID: <98114994-5054-4C01-94A7-C6E0201C51CB@wanadoo.fr> Le 13 d?c. 05 ? 20:11, Ruslan Zasukhin a ?crit : > On 12/13/05 6:06 PM, "Thierry Nauze" wrote: > > Hi Thierry, > >> It is effectively a VERY SERIOUS problem: I have just compiled the >> same application (Doctor DB.rb, example of Valentina). >> - on my portable with V4RB 2.05 >> - on my basic salary with V4RB 2.1B13 >> >> Each works on the machine which compiled it and does not work on the >> other one. >> >> Disturbing! > > What exactly you have move to other computer? The folder vDoctors with its files. > Describe folder and its contents please After, I have : Doctor DB.rb Doctors.text doctors.vdb My Application (2_1b13) My Application (2_05) V4RB_Log ... created by the version 2.1b13 It is all ... Regards, -- Thierry NAUZE Saint-Denis de la R?union From Ed at Kleban.com Tue Dec 13 17:49:53 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 13 18:30:39 2005 Subject: BinaryLink that keep ORDER In-Reply-To: Message-ID: On 12/13/05 9:41 AM, "Ruslan Zasukhin" wrote: > On 12/13/05 4:56 PM, "Ed Kleban" wrote: > >> Sure, but I just want to make sure that if I have a MANY:MANY link and I >> never delete records, and: >> >> I link LeftRid #1 to { 3, 9, 5, 8, 7 } IN THAT ORDER >> and I link { 1, 9, 6, 3, 2 } to rightRid #7 IN THAT ORDER >> >> That when I do a FindLinked( 1, left, right ) I will get an arrayset with: >> { 3, 9, 5, 8, 7 } IN THAT ORDER > > No, you will get > > { 3, 5, 7, 8, 9 } > >> And when I do a FindLinked( 7, right, left ) I will get an arrayset with: >> { 1, 9, 6, 3, 2 } IN THAT ORDER > > No, you will get > > { 1, 2, 3, 6, 9 } > Ok. That's why I kept asking. I'm glad I did. This is not what I understood you saying before. This suggests that I won't be able to use a Binary link for at least one of my needs. I'll have to keep a separate table of two columns with left links and right links so that I can access the RecId of records in this table and sort based on that. Hopefully the efficiency will be similar to that of using a BinaryLink. >> And everything I read in your reply suggested, "Yes, this is the case" > > No. > > BinaryLink is like an index. So it keep list of recIDs sorted by values, > To do binary search. > > --------------------- > Ed, remember few days ago, I have start talk about > > BinaryLink that keep ORDER. > No, unfortunately I do not remember this. Perhaps you can send me a piece of the email if you still have it. > They will do what you want. > > HOW they will do this, I do not know yet, because I see at least 3 ways to > implement, each have own props/cons. > So this is something new that is not available yet? Ok. If you care to share the ways you are thinking about I'd be happy to offer my opinions from my perspective. Thanks! --Ed From sunshine at public.kherson.ua Wed Dec 14 10:31:30 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 02:32:10 2005 Subject: BinaryLink that keep ORDER -- Let's discuss ? In-Reply-To: Message-ID: On 12/14/05 1:49 AM, "Ed Kleban" wrote: >> No, you will get >> >> { 3, 5, 7, 8, 9 } >> >>> And when I do a FindLinked( 7, right, left ) I will get an arrayset with: >>> { 1, 9, 6, 3, 2 } IN THAT ORDER >> >> No, you will get >> >> { 1, 2, 3, 6, 9 } >> > > Ok. That's why I kept asking. I'm glad I did. This is not what I > understood you saying before. This suggests that I won't be able to use a > Binary link for at least one of my needs. I'll have to keep a separate > table of two columns with left links and right links so that I can access > the RecId of records in this table and sort based on that. Hopefully the > efficiency will be similar to that of using a BinaryLink. Why you think that such table solve task ???? Well, it will work only if you NEVER delete records. >> --------------------- >> Ed, remember few days ago, I have start talk about >> >> BinaryLink that keep ORDER. >> > No, unfortunately I do not remember this. Perhaps you can send me a piece > of the email if you still have it. They was on beta list >> They will do what you want. >> >> HOW they will do this, I do not know yet, because I see at least 3 ways to >> implement, each have own props/cons. >> > So this is something new that is not available yet? > Ok. Yes. Point is that this will be in fact BinaryLink which use quite other internal structure and algorithms. And the main: it will work for GENERAL task. - you can delete records. - you can insert records [first|last|before|after] another - you can do searches which use [first|last|before|after] keywords. - you can CHANGE ORDER of existed items Here a lots of points and features can be, I have start some pages about SQL for such feature. Who is interested can read: http://paradigma.ukrcom.kherson.ua/dokuwiki/doku.php?id=paradigma:public:doc umentation:en:vsql:vsql -- 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] From listmail1 at dsl.pipex.com Wed Dec 14 16:11:02 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Wed Dec 14 10:11:34 2005 Subject: Case insensitive LIKE search Message-ID: Is it possible to do a case insensitive SQL Select without having to use Regex? Like the old no_case modifer. Or, even better, is it possible for my LIKE match to respect the value of kStrength I have assigned (kPrimary)? Dave. From sunshine at public.kherson.ua Wed Dec 14 18:46:54 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 10:47:33 2005 Subject: Case insensitive LIKE search In-Reply-To: Message-ID: On 12/14/05 6:11 PM, "Dave Addey" wrote: Hi Dave, > Is it possible to do a case insensitive SQL Select without having to use > Regex? Like the old no_case modifer. > Or, even better, is it possible for my LIKE match to respect the value of > kStrength I have assigned (kPrimary)? But if you have assign or db Strength to be Primary, then LIKE respect this of course! -- 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] From jda at his.com Wed Dec 14 11:57:01 2005 From: jda at his.com (jda) Date: Wed Dec 14 10:57:37 2005 Subject: Case insensitive LIKE search In-Reply-To: References: Message-ID: > > kStrength I have assigned (kPrimary)? > >But if you have assign or db Strength to be Primary, >then LIKE respect this of course! > Hm, I have my db set to CollationAttribute(EVColAttribute.kStrength) = EVColAttributeValue.kSecondary But LIKE searches are still case sensitive (I have to surround the text with % to get case *insensitive* searches). Jon From Ed at Kleban.com Wed Dec 14 10:59:42 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 14 11:00:23 2005 Subject: BinaryLink that keep ORDER -- Let's discuss ? In-Reply-To: Message-ID: On 12/14/05 2:31 AM, "Ruslan Zasukhin" wrote: > On 12/14/05 1:49 AM, "Ed Kleban" wrote: > >>> No, you will get >>> >>> { 3, 5, 7, 8, 9 } >>> >>>> And when I do a FindLinked( 7, right, left ) I will get an arrayset with: >>>> { 1, 9, 6, 3, 2 } IN THAT ORDER >>> >>> No, you will get >>> >>> { 1, 2, 3, 6, 9 } >>> >> >> Ok. That's why I kept asking. I'm glad I did. This is not what I >> understood you saying before. This suggests that I won't be able to use a >> Binary link for at least one of my needs. I'll have to keep a separate >> table of two columns with left links and right links so that I can access >> the RecId of records in this table and sort based on that. Hopefully the >> efficiency will be similar to that of using a BinaryLink. > > Why you think that such table solve task ???? > Well, it will work only if you NEVER delete records. Correct. And I never delete records. If did need to delete records I could presumably add a third field that included linkAddTime for example so I could sort results based on that. I may end up doing that just so I don't end up writing this code a third time should I discover I'm wrong and have to do deletions later. Thanks for pointing that out. >>> --------------------- >>> Ed, remember few days ago, I have start talk about >>> >>> BinaryLink that keep ORDER. >>> >> No, unfortunately I do not remember this. Perhaps you can send me a piece >> of the email if you still have it. > > They was on beta list > If you can provide me with a subject line I'd be happy to go back and read them. >>> They will do what you want. >>> >>> HOW they will do this, I do not know yet, because I see at least 3 ways to >>> implement, each have own props/cons. >>> >> So this is something new that is not available yet? >> Ok. > > Yes. > > Point is that this will be in fact BinaryLink which use quite other internal > structure and algorithms. > > And the main: it will work for GENERAL task. > > - you can delete records. > > - you can insert records [first|last|before|after] another > > - you can do searches which use [first|last|before|after] keywords. > > - you can CHANGE ORDER of existed items > > Here a lots of points and features can be, > I have start some pages about SQL for such feature. > Who is interested can read: > > http://paradigma.ukrcom.kherson.ua/dokuwiki/doku.php?id=paradigma:public:doc > umentation:en:vsql:vsql > Ah, interesting. I'd hope for API calls as well as SQL, but yes, this sounds like a good idea. Thanks --Ed From sunshine at public.kherson.ua Wed Dec 14 19:59:11 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 11:59:51 2005 Subject: Case insensitive LIKE search In-Reply-To: Message-ID: On 12/14/05 6:57 PM, "jda" wrote: >>> kStrength I have assigned (kPrimary)? >> >> But if you have assign or db Strength to be Primary, >> then LIKE respect this of course! >> > > Hm, I have my db set to > > CollationAttribute(EVColAttribute.kStrength) = EVColAttributeValue.kSecondary > But LIKE searches are still case sensitive Ivan, can you clarify ? I believe we have solve this 3 months ago. > (I have to surround the > text with % to get case *insensitive* searches). Hmm. % -- this is wild card symbol. It not affect sensitivity. -- 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] From sunshine at public.kherson.ua Wed Dec 14 19:59:56 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 12:00:38 2005 Subject: BinaryLink that keep ORDER -- Let's discuss ? In-Reply-To: Message-ID: On 12/14/05 6:59 PM, "Ed Kleban" wrote: >> Here a lots of points and features can be, >> I have start some pages about SQL for such feature. >> Who is interested can read: >> >> http://paradigma.ukrcom.kherson.ua/dokuwiki/doku.php?id=paradigma:public:doc >> umentation:en:vsql:vsql >> > > > Ah, interesting. I'd hope for API calls as well as SQL, but yes, this > sounds like a good idea. OF COURSE will exists API methods also -- 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] From sunshine at public.kherson.ua Wed Dec 14 20:01:33 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 12:02:13 2005 Subject: BinaryLink that keep ORDER -- Let's discuss ? In-Reply-To: Message-ID: On 12/14/05 6:59 PM, "Ed Kleban" wrote: >>>> --------------------- >>>> Ed, remember few days ago, I have start talk about >>>> >>>> BinaryLink that keep ORDER. >>>> >>> No, unfortunately I do not remember this. Perhaps you can send me a piece >>> of the email if you still have it. >> >> They was on beta list >> > > If you can provide me with a subject line I'd be happy to go back and read > them. Well, there was no detailed info. Only mention that know I have idea how to implement this _effectively_ -- 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] From macsforever2000 at goodeast.com Wed Dec 14 11:14:46 2005 From: macsforever2000 at goodeast.com (Frank Schima) Date: Wed Dec 14 12:15:24 2005 Subject: Case insensitive LIKE search In-Reply-To: References: Message-ID: On Dec 14, 2005, at 10:59 AM, Ruslan Zasukhin wrote: > On 12/14/05 6:57 PM, "jda" wrote: > >>>> kStrength I have assigned (kPrimary)? >>> >>> But if you have assign or db Strength to be Primary, >>> then LIKE respect this of course! >>> >> >> Hm, I have my db set to >> >> CollationAttribute(EVColAttribute.kStrength) = >> EVColAttributeValue.kSecondary > >> But LIKE searches are still case sensitive > > Ivan, can you clarify ? > > I believe we have solve this 3 months ago. > >> (I have to surround the >> text with % to get case *insensitive* searches). > > Hmm. % -- this is wild card symbol. It not affect sensitivity. Guys, it works fine for me. My database has Secondary collation and my LIKE searches are indeed not case sensitive both with and without the wild card (%) symbol. Using V4RB 2.1b13 but it has worked since at least 2.0.5. Best regards, Frank Schima I'm currently job hunting: From listmail1 at dsl.pipex.com Wed Dec 14 18:20:54 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Wed Dec 14 12:21:29 2005 Subject: Case insensitive LIKE search In-Reply-To: Message-ID: I have tried again, and it seems to be working fine for me now. I think I had not set the collation attribute correctly. With the strength set to kSecondary, it now performs case-insensitive and accent-insensitive searching now - which is *great*! Now I can search for bjork without having to remember how to get the umlaut over the o :-) Thanks, Dave. > From: Frank Schima > Reply-To: Valentina Developers > Date: Wed, 14 Dec 2005 11:14:46 -0700 > To: Valentina Developers > Subject: Re: Case insensitive LIKE search > > > On Dec 14, 2005, at 10:59 AM, Ruslan Zasukhin wrote: > >> On 12/14/05 6:57 PM, "jda" wrote: >> >>>>> kStrength I have assigned (kPrimary)? >>>> >>>> But if you have assign or db Strength to be Primary, >>>> then LIKE respect this of course! >>>> >>> >>> Hm, I have my db set to >>> >>> CollationAttribute(EVColAttribute.kStrength) = >>> EVColAttributeValue.kSecondary >> >>> But LIKE searches are still case sensitive >> >> Ivan, can you clarify ? >> >> I believe we have solve this 3 months ago. >> >>> (I have to surround the >>> text with % to get case *insensitive* searches). >> >> Hmm. % -- this is wild card symbol. It not affect sensitivity. > > Guys, it works fine for me. My database has Secondary collation and > my LIKE searches are indeed not case sensitive both with and without > the wild card (%) symbol. > > Using V4RB 2.1b13 but it has worked since at least 2.0.5. > > > Best regards, > Frank Schima > > I'm currently job hunting: > > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From listmail1 at dsl.pipex.com Wed Dec 14 18:24:04 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Wed Dec 14 12:24:34 2005 Subject: Which is quicker - SELECT * or SELECT field1, field2... Message-ID: Another question: If I only need half of the fields in a table, which should be quicker ? SELECT * or SELECT fieldname1, fieldname2, [...], fieldnameN? I figure that * has to select more, but doesn?t have to do any working out of what to select. Does this make it quicker? How about SELECT ** vs SELECT fieldname1, fieldname2, [...], fieldnameN? V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile, local database only. Thanks for all the help ? I?m nearly there! Dave. From sunshine at public.kherson.ua Wed Dec 14 20:34:09 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 12:34:48 2005 Subject: Case insensitive LIKE search In-Reply-To: Message-ID: On 12/14/05 8:20 PM, "Dave Addey" wrote: > I have tried again, and it seems to be working fine for me now. I think I > had not set the collation attribute correctly. With the strength set to > kSecondary, it now performs > case-insensitive and accent-insensitive Check again. As I remember Primary -- case-insensitive and accent-insensitive Secondary -- case-insensitive but accent-sensitive TERTIARY -- case-sensitive and accent-sensitive (but may be I am wrong) So it sounds like you need Primary. > searching now - which is *great*! Now I can search for bjork without having > to remember how to get the umlaut over the o :-) -- 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] From sunshine at public.kherson.ua Wed Dec 14 20:35:07 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 12:35:46 2005 Subject: Which is quicker - SELECT * or SELECT field1, field2... In-Reply-To: Message-ID: On 12/14/05 8:24 PM, "Dave Addey" wrote: > Another question: > > If I only need half of the fields in a table, which should be quicker ? > SELECT * or SELECT fieldname1, fieldname2, [...], fieldnameN? > > I figure that * has to select more, but doesn?t have to do any working out > of what to select. Does this make it quicker? > > How about SELECT ** vs SELECT fieldname1, fieldname2, [...], fieldnameN? Always good idea select fields explicitly -- 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] From listmail1 at dsl.pipex.com Wed Dec 14 18:36:20 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Wed Dec 14 12:36:51 2005 Subject: Case insensitive LIKE search In-Reply-To: Message-ID: Gah! I meant Primary - in fact, I am using Primary - I just typed "Secondary" by accident in my email. Sorry! Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Wed, 14 Dec 2005 20:34:09 +0200 > To: "valentina@lists.macserve.net" > Conversation: Case insensitive LIKE search > Subject: Re: Case insensitive LIKE search > > On 12/14/05 8:20 PM, "Dave Addey" wrote: > >> I have tried again, and it seems to be working fine for me now. I think I >> had not set the collation attribute correctly. With the strength set to >> kSecondary, it now performs >> case-insensitive and accent-insensitive > > Check again. As I remember > > Primary -- case-insensitive and accent-insensitive > > Secondary -- case-insensitive but accent-sensitive > > TERTIARY -- case-sensitive and accent-sensitive > > (but may be I am wrong) > > So it sounds like you need Primary. > > >> searching now - which is *great*! Now I can search for bjork without having >> to remember how to get the umlaut over the o :-) > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From IvanSmahin at public.kherson.ua Wed Dec 14 20:40:46 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Wed Dec 14 12:41:14 2005 Subject: Case insensitive LIKE search In-Reply-To: References: Message-ID: <496120117.20051214204046@public.kherson.ua> Hello jda, Wednesday, December 14, 2005, 6:57:01 PM, you wrote: >> > kStrength I have assigned (kPrimary)? >> >>But if you have assign or db Strength to be Primary, >>then LIKE respect this of course! >> j> Hm, I have my db set to j> CollationAttribute(EVColAttribute.kStrength) = EVColAttributeValue.kSecondary j> But LIKE searches are still case sensitive (I have to surround the j> text with % to get case *insensitive* searches). Strange. Everything works here. Ok. Could you send me a little project or database for testing? -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From ayu8 at cdc.gov Wed Dec 14 13:37:51 2005 From: ayu8 at cdc.gov (Sims, John) Date: Wed Dec 14 12:42:55 2005 Subject: Which is quicker - SELECT * or SELECT field1, field2... Message-ID: > -----Original Message----- > From: valentina-bounces@lists.macserve.net > [mailto:valentina-bounces@lists.macserve.net] On Behalf Of Dave Addey > Sent: Wednesday, December 14, 2005 1:24 PM > To: Valentina Developers > Subject: Which is quicker - SELECT * or SELECT field1, field2... > > Another question: > > If I only need half of the fields in a table, which should be > quicker ? SELECT * or SELECT fieldname1, fieldname2, [...], > fieldnameN? > > I figure that * has to select more, but doesn?t have to do > any working out of what to select. Does this make it quicker? > > How about SELECT ** vs SELECT fieldname1, fieldname2, [...], > fieldnameN? > > V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile, local > database only. > > Thanks for all the help ? I?m nearly there! > > Dave. Hi Dave, A general rule of thumb for SQL is to only ask for what you need, although that rule really tends to apply more to client/server environments to limit the amount of data going back and forth along "the pipe". My advice would be to follow this rule even for local databases solely for the "consider the future" aspect. You may be local now, but as time goes by you may find that you eventually take your app to the next level and make it client/server. As far as which is faster internally for Valentina, that we'll have to leave to Ruslan to answer :-) Take care, -John From Ed at Kleban.com Wed Dec 14 13:11:47 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 14 13:12:18 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/12/05 3:46 PM, "Ruslan Zasukhin" wrote: > On 12/12/05 11:09 PM, "Ed Kleban" wrote: > >> Ah, I finally figured it out. Table is an array, not a property. > > Correctly to say: > > it is INDEXED property. > > > Visual BASIC support this as built-in feature. > I mean indexed properties. > > REALbasic also provide good syntax for this > Yes quite right. Unfortunately no matter what you want to call it, the complier wants nothing to do with it. Given the following constructor method: Sub CBLnkItmParentOf(itemsTable as CTblItems, linkName as String) const here = "CBLnkItmParentOf" self.name = linkName Table(0) = itemsTable Table(1) = itemsTable blipoTblItems = itemsTable End Sub The compiler complains regarding "Table" that "This method or property does not exist." So I guess if I wanted to do this I'd have to cache another copy of the itemsTable... which is fine. However you've convinced me I can't use a BinaryLink here so the code will go away. But I'm sure I'll want to use the trick again sometime later. From listmail1 at dsl.pipex.com Wed Dec 14 19:12:59 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Wed Dec 14 13:13:31 2005 Subject: Which is quicker - SELECT * or SELECT field1, field2... In-Reply-To: Message-ID: Well, I went through and set the code to select just the ones it needs - but there was no sign of a speed increase, so I'll stick with SELECT * for now. In fact, it kind of ended up slowing things down, as my code to calculate the field names was taking a while! Thanks for the advice, Dave. > From: "Sims, John" > Reply-To: Valentina Developers > Date: Wed, 14 Dec 2005 13:37:51 -0500 > To: Valentina Developers > Conversation: Which is quicker - SELECT * or SELECT field1, field2... > Subject: RE: Which is quicker - SELECT * or SELECT field1, field2... > > >> -----Original Message----- >> From: valentina-bounces@lists.macserve.net >> [mailto:valentina-bounces@lists.macserve.net] On Behalf Of Dave Addey >> Sent: Wednesday, December 14, 2005 1:24 PM >> To: Valentina Developers >> Subject: Which is quicker - SELECT * or SELECT field1, field2... >> >> Another question: >> >> If I only need half of the fields in a table, which should be >> quicker ? SELECT * or SELECT fieldname1, fieldname2, [...], >> fieldnameN? >> >> I figure that * has to select more, but doesn?t have to do >> any working out of what to select. Does this make it quicker? >> >> How about SELECT ** vs SELECT fieldname1, fieldname2, [...], >> fieldnameN? >> >> V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile, local >> database only. >> >> Thanks for all the help ? I?m nearly there! >> >> Dave. > > Hi Dave, > > A general rule of thumb for SQL is to only ask for what you need, although > that rule really tends to apply more to client/server environments to limit > the amount of data going back and forth along "the pipe". My advice would be > to follow this rule even for local databases solely for the "consider the > future" aspect. You may be local now, but as time goes by you may find that > you eventually take your app to the next level and make it client/server. As > far as which is faster internally for Valentina, that we'll have to leave to > Ruslan to answer :-) > > Take care, > > -John > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From jda at his.com Wed Dec 14 14:42:16 2005 From: jda at his.com (jda) Date: Wed Dec 14 13:42:46 2005 Subject: Case insensitive LIKE search In-Reply-To: References: Message-ID: >On 12/14/05 6:57 PM, "jda" wrote: > >>>> kStrength I have assigned (kPrimary)? >>> >>> But if you have assign or db Strength to be Primary, >>> then LIKE respect this of course! >>> >> >> Hm, I have my db set to >> >> CollationAttribute(EVColAttribute.kStrength) = >>EVColAttributeValue.kSecondary > >> But LIKE searches are still case sensitive > >Ivan, can you clarify ? > >I believe we have solve this 3 months ago. > >> (I have to surround the >> text with % to get case *insensitive* searches). > >Hmm. % -- this is wild card symbol. It not affect sensitivity. > >-- >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] > > >_______________________________________________ >Valentina mailing list >Valentina@lists.macserve.net >http://lists.macserve.net/mailman/listinfo/valentina From jda at his.com Wed Dec 14 14:43:00 2005 From: jda at his.com (jda) Date: Wed Dec 14 13:43:31 2005 Subject: Case insensitive LIKE search In-Reply-To: References: Message-ID: > >Ivan, can you clarify ? > >I believe we have solve this 3 months ago. > >> (I have to surround the >> text with % to get case *insensitive* searches). > >Hmm. % -- this is wild card symbol. It not affect sensitivity. > Um, sorry about that. I wrote before I thought. Never mind... Jon From sunshine at public.kherson.ua Wed Dec 14 22:32:16 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 14 14:32:57 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/14/05 9:11 PM, "Ed Kleban" wrote: > Yes quite right. Unfortunately no matter what you want to call it, the > complier wants nothing to do with it. Given the following constructor > method: > > > Sub CBLnkItmParentOf(itemsTable as CTblItems, linkName as String) > > const here = "CBLnkItmParentOf" > > self.name = linkName > Table(0) = itemsTable > Table(1) = itemsTable > > blipoTblItems = itemsTable > End Sub > > > The compiler complains regarding "Table" that "This method or property does > not exist." So I guess if I wanted to do this I'd have to cache another > copy of the itemsTable... which is fine. However you've convinced me I > can't use a BinaryLink here so the code will go away. But I'm sure I'll > want to use the trick again sometime later. You cannot ASSIGN to that properties. I think they are marked in docs as r/o READ ONLY. -- 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] From maxprog at mac.com Wed Dec 14 22:11:12 2005 From: maxprog at mac.com (Stan Busk) Date: Wed Dec 14 15:11:45 2005 Subject: Unique field not so unique... Message-ID: Hi, Converting a v1 database to v2 I get: =FE=FF=00E=00R=00R=00O=00R=00:=00 =000=00x=002=003=005=000=003=00 = =00A=00t=00t=00e=00m=00p=00t=00 =00t=00o=00 =00i=00n=00s=00e=00r=00t=00 = =00=20 d=00u=00p=00l=00i=00c=00a=00t=00e=00 =00k=00e=00y=00 =00r=00o=00w=00 = =00i=00n=00 =00=20 o=00b=00j=00e=00c=00t=00 =00"=00G=00r=00o=00u=00p=00L=00i=00s=00t=00"=00 = =00w=00i=00t=00h=00 =00u=00n=00i=00q=00u=00e=00 =00=20 i=00n=00d=00e=00x=00 = =00"=00U=00_=00G=00r=00o=00u=00p=00L=00i=00s=00t=00_=00G=00r=00o=00u=00p=00= L=00i=00s=00t=00_=00G=00r=00o=00u=00p=00I=00D=00=20 "=00.=00 It refers to a field that is set a VUnique in v1 however v1_to_v2 =20 converter finds duplicates. Was v1 including duplicates? Problem is that such file in now unconvertible. With Valentina.ThrowExceptions =3D True, I get the VException. With Valentina.ThrowExceptions =3D False, I get a crash. Stan= From Ed at Kleban.com Wed Dec 14 18:07:56 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 14 18:08:28 2005 Subject: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. Message-ID: Hi Ruslan, If I call: FindLinked( inSet as VSet, inTableA as VTable, inTableB as VTable, inRecursionDirection as EVRecursionDirection = kFromParentToChild ) as VArraySet Then what is the order of the InTableB rids within the returned VArraySet? I am hoping it is the same as the order of the matching inTableA rids within inSet So that I can first Sort the elements of inSet and then use that to control the order of the rid values I get back from within the returned VArraySet. Thanks! --Ed From Ed at Kleban.com Wed Dec 14 18:59:54 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 14 19:00:28 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/14/05 2:32 PM, "Ruslan Zasukhin" wrote: > On 12/14/05 9:11 PM, "Ed Kleban" wrote: > >> Yes quite right. Unfortunately no matter what you want to call it, the >> complier wants nothing to do with it. Given the following constructor >> method: >> >> >> Sub CBLnkItmParentOf(itemsTable as CTblItems, linkName as String) >> >> const here = "CBLnkItmParentOf" >> >> self.name = linkName >> Table(0) = itemsTable >> Table(1) = itemsTable >> >> blipoTblItems = itemsTable >> End Sub >> >> >> The compiler complains regarding "Table" that "This method or property does >> not exist." So I guess if I wanted to do this I'd have to cache another >> copy of the itemsTable... which is fine. However you've convinced me I >> can't use a BinaryLink here so the code will go away. But I'm sure I'll >> want to use the trick again sometime later. > > You cannot ASSIGN to that properties. > I think they are marked in docs as r/o READ ONLY. > They are not marked that way on page 164 of my document, which is the only reference I can find. From Ed at Kleban.com Wed Dec 14 19:38:34 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 14 19:39:07 2005 Subject: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: Ok, I'm guessing the question below is irrelevant because as my last email on the subject of "V4RB Confusion" notes, despite documentation errors to the contrary is probably is FindLinked method that both takes an (inSet as VArraySet) as an argument and returns a VArraySet as a result. So I'm a bit lost on how to implement what I need. I have two tables. The first is TblItems which has some miscellaneous fields. The second is TblTree which keeps the MANY:MANY parent/child releationships and and sequence order of children for the records in TblItems. TblTree has 3 fields: fTreeParent as VObjectPtr // Rid of parent in TblItems fTreeChild as VObjectPtr // Rid of child in TblItems fTreeSeq as UShort // Relative sequence number of child. So I now want to implement a method that will return a list of the children in sequence order for a given parent. First I get all the children records for a given parent: treeRidSet = TblTree.fTreeParent.FindLinked( _ parentItemRid,TblTree, TblItems ) What I would like to then do is: // Sort records by sequence number: orderedTreeRidSet = TblTree.Sort( treeRidSet, TblTree.fTreeSeq ) // Retrieve TblItem Rids in the current sorted order: orderedItemRidSet = _ TblTree.vlChildToItemLink.FindLinkedAsArraySet( _ orderedTreeRidSet, TblTree, TblItems ) However, there is no such call as FindLlinkedAsArraySet, and I'm not sure it would preserve the inSet order if there was. So how do I do this? I guess I could try and retrieve the child links first: unorderedChildBitSet = _ TblTree.vlChildToItemLink.FindLinkedAsBitSet( _ treeRidSet, TblTree, TblItems) // Perform painful, expensive conversion from BitSet to ArraySet unorderedChildArraySet = VArraySet( unorderedChildBitSet ) But then how do I sort these based on the order of TblTree records in orderedTreeRidSet ? This one just has me stumped. The only solutions that come to mind are: 1) Do all this much more slowly in SQL. Yuck. 2) Combine the TblTree fields into TblItems where I have a sufficent set of API calls to make this work... But now that TblTree is managing MANY:MANY parent/child relationships his just isn't feasible. 3) Convince to you write ASAP a FindLinkedAsArraySet method that preserves the same order of records in the VArraySet result as the same order in the passed inSet argument. Do you have some other suggestions to offer? Thanks! --Ed ------ Forwarded Message From: Ed Kleban Date: Wed, 14 Dec 2005 18:07:56 -0600 To: "Valentina Developers " Conversation: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. Subject: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. Hi Ruslan, If I call: FindLinked( inSet as VSet, inTableA as VTable, inTableB as VTable, inRecursionDirection as EVRecursionDirection = kFromParentToChild ) as VArraySet Then what is the order of the InTableB rids within the returned VArraySet? I am hoping it is the same as the order of the matching inTableA rids within inSet So that I can first Sort the elements of inSet and then use that to control the order of the rid values I get back from within the returned VArraySet. Thanks! --Ed ------ End of Forwarded Message From Ed at Kleban.com Wed Dec 14 20:33:45 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 14 20:34:17 2005 Subject: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/14/05 7:38 PM, "Ed Kleban" wrote: > > Ok, I'm guessing the question below is irrelevant because as my last email > on the subject of "V4RB Confusion" notes, despite documentation errors to > the contrary is probably is FindLinked method that both takes an (inSet as > VArraySet) as an argument and returns a VArraySet as a result. So I'm a bit > lost on how to implement what I need. > > I have two tables. > > The first is TblItems which has some miscellaneous fields. > > The second is TblTree which keeps the MANY:MANY parent/child > releationships and and sequence order of children for the records in > TblItems. > > TblTree has 3 fields: > > fTreeParent as VObjectPtr // Rid of parent in TblItems > fTreeChild as VObjectPtr // Rid of child in TblItems > fTreeSeq as UShort // Relative sequence number of child. > > So I now want to implement a method that will return a list of the children > in sequence order for a given parent. > > First I get all the children records for a given parent: > > treeRidSet = TblTree.fTreeParent.FindLinked( _ > parentItemRid,TblTree, TblItems ) > > What I would like to then do is: > > // Sort records by sequence number: > orderedTreeRidSet = TblTree.Sort( treeRidSet, TblTree.fTreeSeq ) > > // Retrieve TblItem Rids in the current sorted order: > orderedItemRidSet = _ > TblTree.vlChildToItemLink.FindLinkedAsArraySet( _ > orderedTreeRidSet, TblTree, TblItems ) > > However, there is no such call as FindLlinkedAsArraySet, and I'm not sure it > would preserve the inSet order if there was. > > So how do I do this? I guess I could try and retrieve the child links > first: > > unorderedChildBitSet = _ > TblTree.vlChildToItemLink.FindLinkedAsBitSet( _ > treeRidSet, TblTree, TblItems) > > // Perform painful, expensive conversion from BitSet to ArraySet > unorderedChildArraySet = VArraySet( unorderedChildBitSet ) > > But then how do I sort these based on the order of TblTree records in > orderedTreeRidSet ? > > This one just has me stumped. The only solutions that come to mind are: > > 1) Do all this much more slowly in SQL. Yuck. > > 2) Combine the TblTree fields into TblItems where I have a sufficent set of > API calls to make this work... But now that TblTree is managing MANY:MANY > parent/child relationships his just isn't feasible. > > 3) Convince to you write ASAP a FindLinkedAsArraySet method that preserves > the same order of records in the VArraySet result as the same order in the > passed inSet argument. > 4) Ok, I figured out one possible way out of this predicament. You can execute a loop to replace every TblTreeRid in orderedTreeRidSet with the corresponding TblItemRid from the same record, then return the orderedTreeRidSet (which is then actually an orderedItemRidSet ): call cursorOnFTreeChild.updateFieldCursor for index as Integer = orderedTreeRidSet.count downTo 1 treeRid = orderedTreeRidSet.itemAt( index ) orderedTreeRidSet.ItemAt( index ) = _ cursorOnFTreeChild.integerValue( treeRid, kNoUpdate ) next return orderedTreeRidSet > Do you have some other suggestions to offer? And I'm still both open to more suggestions and curious if you are willing to do (3) above :-) > Thanks! > --Ed > > From sunshine at public.kherson.ua Thu Dec 15 10:51:48 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 02:52:35 2005 Subject: Object-Persistence in database In-Reply-To: <43CA16AC-2C12-45B9-A4B4-1E39C30C9B08@mac.com> Message-ID: On 12/15/05 10:20 AM, "Guyren Howe" wrote: Hi Guyren, > Actually, since the folks who are developing this are on here: how > about letting us store objects in the database? > Now, that I could get interested in. > You could define a column type to be the name of a class or a class > interface. > This class or the classes implementing this interface would *also* need to > implement a DBSerialize interface. Now, that would give me a reason to get > interested. You talk here about kind of OO DBMS. For you info: - exists separate world of OO DBMS - they have own ODMG standard - they have own OQL query language. - they are NOT similar to RDBMS - they claim that OODB work with C++ Java and Smalltalk. Well, we can add now that Apple have add own persistence layer CoreData, which is far far not the same as OO DBMS IMHO (it not follow ODMG standard at least). ------ Guyren, Serialization way * has a lots of problems...IMHO. In 1995-1998 year we have name Valentina to be OO DBMS. But then into game have come ODMG standard, which have "corrupt" this name. So we have start name Valentina as ORDBMS. I have never like ideas of OO DBMS as ODMG describeS. Main reasons: - IMHO it is bad when user do not see when info go to/from db. - IMHO payment for such feature is unneeded overhead to watch for objects, to load them and unload them, a lots of proxy-objects...nightmare. - IMHO it is stupid to say that OO DBMS can be used only from OO language. FALSE, LIE. My point of view that OO features of DB, its model are not related in any way to language/API of access. Well, INSTEAD, in Valentina we offer other way -- Class way. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You develop own set of classes (yes which play as persistent), Which are subclasses from Valentina classes. Now you get best of 2 worlds. - you work with OO classes and OO API - you self control what is going on. ------- In the same time I believe that Valentina has very perfect internal structure and features for implementation of persistence LAYERS over it. They can be ODMG-compliant as well as something else. -- 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] From sunshine at public.kherson.ua Thu Dec 15 11:03:27 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 03:04:10 2005 Subject: Unique field not so unique... In-Reply-To: Message-ID: On 12/14/05 11:11 PM, "Stan Busk" wrote: Hi Stan, > Converting a v1 database to v2 I get: > > ??ERROR: 0x23503 Attempt to insert > duplicate key row in > object "GroupList" with unique > index "U_GroupList_GroupList_GroupID > ". > > It refers to a field that is set a VUnique in v1 however v1_to_v2 > converter finds duplicates. Was v1 including duplicates? I think this could happens only if index was corrupted. Am I right that you do not see which record/value is duplicated? To remove it and convert again ? > Problem is that such file in now unconvertible. > > With Valentina.ThrowExceptions = True, I get the VException. > With Valentina.ThrowExceptions = False, I get a crash. -- 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] From sunshine at public.kherson.ua Thu Dec 15 11:10:31 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 03:11:13 2005 Subject: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 2:07 AM, "Ed Kleban" wrote: Hi Ed, > If I call: > > FindLinked( > inSet as VSet, > inTableA as VTable, > inTableB as VTable, > inRecursionDirection as EVRecursionDirection = kFromParentToChild ) > as VArraySet > > > Then what is the order of the InTableB rids within the returned VArraySet? > > I am hoping it is the same as the order of the matching inTableA rids within > inSet So that I can first Sort the elements of inSet and then use that to > control the order of the rid values I get back from within the returned > VArraySet. Yes a1 b2 b5 b7 a2 b3 b8 a3 b4 b6 -- 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] From sunshine at public.kherson.ua Thu Dec 15 11:20:17 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 03:20:59 2005 Subject: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 3:38 AM, "Ed Kleban" wrote: > I have two tables. > > The first is TblItems which has some miscellaneous fields. > > The second is TblTree which keeps the MANY:MANY parent/child > releationships and and sequence order of children for the records in > TblItems. > > TblTree has 3 fields: > > fTreeParent as VObjectPtr // Rid of parent in TblItems > fTreeChild as VObjectPtr // Rid of child in TblItems > fTreeSeq as UShort // Relative sequence number of child. > > So I now want to implement a method that will return a list of the children > in sequence order for a given parent. Ed, Without BinaryLink with order this is nightmare :-( I self have try develop such tasks, this is why I have come to idea of such binary links.. -- 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] From sunshine at public.kherson.ua Thu Dec 15 12:16:53 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 04:17:35 2005 Subject: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 3:38 AM, "Ed Kleban" wrote: > I have two tables. > > The first is TblItems which has some miscellaneous fields. > > The second is TblTree which keeps the MANY:MANY parent/child > releationships and and sequence order of children for the records in > TblItems. > > TblTree has 3 fields: > > fTreeParent as VObjectPtr // Rid of parent in TblItems > fTreeChild as VObjectPtr // Rid of child in TblItems > fTreeSeq as UShort // Relative sequence number of child. > > So I now want to implement a method that will return a list of the children > in sequence order for a given parent. > > First I get all the children records for a given parent: > > treeRidSet = TblTree.fTreeParent.FindLinked( _ > parentItemRid,TblTree, TblItems ) treeRidSet -- this is ArraySet. ok > What I would like to then do is: > > // Sort records by sequence number: > orderedTreeRidSet = TblTree.Sort( treeRidSet, TblTree.fTreeSeq ) MISTAKE! treeRidSet -- is set of records for table TblItems. So you cannot use it in TblTree.Sort() > // Retrieve TblItem Rids in the current sorted order: > orderedItemRidSet = _ > TblTree.vlChildToItemLink.FindLinkedAsArraySet( _ > orderedTreeRidSet, TblTree, TblItems ) > > However, there is no such call as FindLlinkedAsArraySet, and I'm not sure it > would preserve the inSet order if there was. You mean function which convert ArraySet of T1 into ArraySet of T2 ? Yes there is no such method. Up to know I was need only BitSet of T1 into BitSet of T2 > So how do I do this? I guess I could try and retrieve the child links > first: > > unorderedChildBitSet = _ > TblTree.vlChildToItemLink.FindLinkedAsBitSet( _ > treeRidSet, TblTree, TblItems) > > // Perform painful, expensive conversion from BitSet to ArraySet > unorderedChildArraySet = VArraySet( unorderedChildBitSet ) > > But then how do I sort these based on the order of TblTree records in > orderedTreeRidSet ? > > This one just has me stumped. The only solutions that come to mind are: > > 1) Do all this much more slowly in SQL. Yuck. I think this is only a way until we give you power of BinaryLink Ordered > 2) Combine the TblTree fields into TblItems where I have a sufficent set of > API calls to make this work... But now that TblTree is managing MANY:MANY > parent/child relationships his just isn't feasible. right > 3) Convince to you write ASAP a FindLinkedAsArraySet method that preserves > the same order of records in the VArraySet result as the same order in the > passed inSet argument. You have see mistake above? So you need do 2 such conversions. find items convert to tree sort convert to items Now tell me, that BinaryLinks with order beat ANYTHING that RDBMS world can offer :-)) -- 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] From maxprog at mac.com Thu Dec 15 11:19:11 2005 From: maxprog at mac.com (Stan Busk) Date: Thu Dec 15 04:19:44 2005 Subject: Unique field not so unique... In-Reply-To: References: Message-ID: <2BABC7BC-7557-4025-BE36-F7F95AA07C7F@mac.com> Hi, No, I can't see it. This table contains dozens of thousands entries. The index was rebuilt right before conversion using previous app. Would it be possible to change behavior on that situation? I mean, a =20 crash doesn't help. Ignore the error, change the offending file value... Stan > On 12/14/05 11:11 PM, "Stan Busk" wrote: > > Hi Stan, > >> Converting a v1 database to v2 I get: >> >> =FE=FFERROR: 0x23503 Attempt to insert >> duplicate key row in >> object "GroupList" with unique >> index "U_GroupList_GroupList_GroupID >> ". >> >> It refers to a field that is set a VUnique in v1 however v1_to_v2 >> converter finds duplicates. Was v1 including duplicates? > > I think this could happens only if index was corrupted. > > Am I right that you do not see which record/value is duplicated? > To remove it and convert again ? > >> Problem is that such file in now unconvertible. >> >> With Valentina.ThrowExceptions =3D True, I get the VException. >> With Valentina.ThrowExceptions =3D False, I get a crash. > > --=20 > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Thu Dec 15 12:20:49 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 04:21:33 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/15/05 2:59 AM, "Ed Kleban" wrote: >> You cannot ASSIGN to that properties. >> I think they are marked in docs as r/o READ ONLY. >> > > They are not marked that way on page 164 of my document, which is the only > reference I can find. Ok, I will correct. So you still have problems with this ? It seems you try create subclass of BinaryLink? Note, in constructor of MyBinaryLink you should call parent constructor --------------------- Sub MyBinaryLink( t1, t2, ... ) VBinaryLink( t1, t2, ...) End -- 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] From sunshine at public.kherson.ua Thu Dec 15 12:25:58 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 04:26:40 2005 Subject: Unique field not so unique... In-Reply-To: <2BABC7BC-7557-4025-BE36-F7F95AA07C7F@mac.com> Message-ID: On 12/15/05 12:19 PM, "Stan Busk" wrote: > Hi, > > No, I can't see it. This table contains dozens of thousands entries. > The index was rebuilt right before conversion using previous app. > Would it be possible to change behavior on that situation? I mean, a > crash doesn't help. Ignore the error, change the offending file value... So index was rebuilt ? Then something wrong. Can you send to Ivan this v1 database for testing ? -- 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] From sunshine at public.kherson.ua Thu Dec 15 12:41:20 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 04:42:02 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/15/05 2:59 AM, "Ed Kleban" wrote: >> You cannot ASSIGN to that properties. >> I think they are marked in docs as r/o READ ONLY. >> > > They are not marked that way on page 164 of my document, which is the only > reference I can find. Ed, I have check docs and ... Why you think you could assign to this link.Table(i) = t1 ??? This is like try to assign to sin(5) = .4 In docs this pointed as Method. Which "Returns a table of link by index". Quite clear. -- 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] From Ed at Kleban.com Thu Dec 15 08:56:37 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 08:57:11 2005 Subject: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 4:16 AM, "Ruslan Zasukhin" wrote: > >> First I get all the children records for a given parent: >> >> treeRidSet = TblTree.fTreeParent.FindLinked( _ >> parentItemRid,TblTree, TblItems ) > > treeRidSet -- this is ArraySet. ok > >> What I would like to then do is: >> >> // Sort records by sequence number: >> orderedTreeRidSet = TblTree.Sort( treeRidSet, TblTree.fTreeSeq ) > > MISTAKE! > > treeRidSet -- is set of records for table TblItems. > > So you cannot use it in TblTree.Sort() > Right.... yeah I missed that one. Ok. Well, this is a perfectly reasonable thing to want to do. So either: 1) Perhaps this is something that falls out of the new Ordered BinaryLink scheme you have in mind... But I don't thinks so. This looks to be a desirable operation whether your links are ordered or not. Or... 2) Sounds like there should be some new method(s) for doing this or some new optional argument supported by FindLinked, FindLinkdAsBitSet, and FindLinkedAsArraySet. > On 12/15/05 3:38 AM, "Ed Kleban" wrote: > >> 1) Do all this much more slowly in SQL. Yuck. > > I think this is only a way until we give you power of BinaryLink Ordered > Yeah... but this is only one example query of many similar onese. I need to be able to have the intermediate cached results at various points so I can reuse them to do even more complex relation management with less overhead. This would just blow up into a huge mess in SQL or be slow as a dead turtle if each query would have to start from scratch. It's the inSet argument that's providing the speed here, and I don't believe SQL supports that. >> 3) Convince to you write ASAP a FindLinkedAsArraySet method that preserves >> the same order of records in the VArraySet result as the same order in the >> passed inSet argument. > > You have see mistake above? > > So you need do 2 such conversions. > > find items > convert to tree > sort > convert to items > > Now tell me, that BinaryLinks with order beat > ANYTHING that RDBMS world can offer :-)) > BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer BinaryLinks with order beat ANYTHING that RDBMS world can offer I guess I better start thinking about the three possible implementations of Binary links you're debating about, eh? Care to share the implementation details or protocol differences you're debating about? From Ed at Kleban.com Thu Dec 15 08:58:13 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 08:58:50 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/15/05 4:20 AM, "Ruslan Zasukhin" wrote: > On 12/15/05 2:59 AM, "Ed Kleban" wrote: > >>> You cannot ASSIGN to that properties. >>> I think they are marked in docs as r/o READ ONLY. >>> >> >> They are not marked that way on page 164 of my document, which is the only >> reference I can find. > > Ok, I will correct. > > So you still have problems with this ? No, I've scrapped that code. I only mention this here so you can fix your documentation. > It seems you try create subclass of BinaryLink? Yes, > Note, in constructor of MyBinaryLink > you should call parent constructor > > --------------------- > Sub MyBinaryLink( t1, t2, ... ) > > VBinaryLink( t1, t2, ...) > > > End Yes, that makes much more sense. Thanks! --Ed From Ed at Kleban.com Thu Dec 15 09:02:33 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 09:03:07 2005 Subject: Building VBinaryLink subclass in RB In-Reply-To: Message-ID: On 12/15/05 4:41 AM, "Ruslan Zasukhin" wrote: > On 12/15/05 2:59 AM, "Ed Kleban" wrote: > >>> You cannot ASSIGN to that properties. >>> I think they are marked in docs as r/o READ ONLY. >>> >> >> They are not marked that way on page 164 of my document, which is the only >> reference I can find. > > Ed, > > I have check docs and ... > > Why you think you could assign to this > > link.Table(i) = t1 > > ??? Mental deficiency? Clearly a case of brain damage on my part. Yeah, the reason is that when I first reported this I had not seen this entry for Table as a method on page 164 until you had pointed it out to me later. I had only seen it as a name listed by autocomplete. And I didn't think to check it in context again when I saw it and wrote the note above. Thanks for cluing me in . From Ed at Kleban.com Thu Dec 15 09:06:52 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 09:07:27 2005 Subject: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 3:10 AM, "Ruslan Zasukhin" wrote: > On 12/15/05 2:07 AM, "Ed Kleban" wrote: > > Hi Ed, > >> If I call: >> >> FindLinked( >> inSet as VSet, >> inTableA as VTable, >> inTableB as VTable, >> inRecursionDirection as EVRecursionDirection = kFromParentToChild ) >> as VArraySet >> >> >> Then what is the order of the InTableB rids within the returned VArraySet? >> >> I am hoping it is the same as the order of the matching inTableA rids within >> inSet So that I can first Sort the elements of inSet and then use that to >> control the order of the rid values I get back from within the returned >> VArraySet. > > Yes Uh, no. Because as we concluded in later emails after this one was sent, there is no such method yet that takes an (inSet as Vset) argument and return a VArraySet argument. > a1 b2 > b5 > b7 > > a2 b3 > b8 > > a3 b4 > b6 I have no clue what these a & b rids are intended to show or mean here. But not important. Let's work on the spec for FindLinkedAsArraySet as you've started in another email. From sunshine at public.kherson.ua Thu Dec 15 17:50:44 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 09:51:26 2005 Subject: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 4:56 PM, "Ed Kleban" wrote: > I guess I better start thinking about the three possible implementations of > Binary links you're debating about, eh? Care to share the implementation > details or protocol differences you're debating about? Off list -- 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] From Ed at Kleban.com Thu Dec 15 10:30:45 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 10:31:20 2005 Subject: VArraySet.Lookup Re: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 4:16 AM, "Ruslan Zasukhin" wrote: > On 12/15/05 3:38 AM, "Ed Kleban" wrote: > >> What I would like to then do is: >> >> // Sort records by sequence number: >> orderedTreeRidSet = TblTree.Sort( treeRidSet, TblTree.fTreeSeq ) > > MISTAKE! > > treeRidSet -- is set of records for table TblItems. > > So you cannot use it in TblTree.Sort() > >> 1) Do all this much more slowly in SQL. Yuck. > > I think this is only a way until we give you power of BinaryLink Ordered > Yeah, but Ordered BinaryLink (OBL?) is not something that you want to rush. This needs a lot of thought, coding, testing, and beta testing before it you'll want to make this available. >> 2) Combine the TblTree fields into TblItems where I have a sufficent set of >> API calls to make this work... But now that TblTree is managing MANY:MANY >> parent/child relationships his just isn't feasible. > > right > >> 3) Convince to you write ASAP a FindLinkedAsArraySet method that preserves >> the same order of records in the VArraySet result as the same order in the >> passed inSet argument. This on the other hand would be a simple minor tweak to existing code, and is the topic of other email we are exchanging. Being able to do something sooner like this would be great. > > You have see mistake above? > > So you need do 2 such conversions. > (1) > find items (2) > convert to tree (3) > sort (4) > convert to items If you implement FindLinkedAsArraySet with the optional: ( inRetainedRid as EVRetainedRid = kLinkedTo ) parameter as I proposed, then this will take care of both (1) and (2) together. The simple, fast, one-line, generalized call to sort I note above can then be used. But you're quite correct that we still need to do a conversion for (4). And if you choose not to implement inRetainedRid then yes, we need to do a conversion for (2) as well. And this conversion is very messy. As I noted, the code I used for it was: > 4) Ok, I figured out one possible way out of this predicament. You can > execute a loop to replace every TblTreeRid in orderedTreeRidSet with the > corresponding TblItemRid from the same record, then return the > orderedTreeRidSet (which is then actually an orderedItemRidSet ): > > call cursorOnFTreeChild.updateFieldCursor > for index as Integer = orderedTreeRidSet.count downTo 1 > treeRid = orderedTreeRidSet.itemAt( index ) > orderedTreeRidSet.ItemAt( index ) = _ > cursorOnFTreeChild.integerValue( treeRid, kNoUpdate ) > next > > return orderedTreeRidSet Having to perform a loop with a get and set for each element of the ArraySet would of course be much faster if there was an API call that did this. More importantly, it could avoid the problem regarding lack of a lazy read that I compensate for through the use of one of my magic cursorFields, but which many folk don't even realize is a problem that they are paying a huge performance penalty for. So how about a quick and simple API call for performing this mapping function? Perhaps something like: ======= VArraySet.Lookup( sourceSet as VArraySet, fromField as VField, targetSet as VArraySet = nil) Retrieves the value of fromField out of the records with RecId values included in sourceSet, and stores the retrieved values in the corresponding item of targetSet. When targetSet is nil or when sourceSet = targetSet, then the values of sourceSet are replaced with the retrieved field values from the records that sourceSet identifies. Note that fromField must be a numeric field. If sourceSet has fewer items than targetSet then only the first sourceSet.count items of targetSet are affected. If sourceSet has more items than targetSet, then additional items will be appended to targetSet. ======= Note that I endeavored to specify a more generalized method here than is necessary for my immediate needs. The targetSet parameter could certainly be omitted in a quick and dirty implementation to keep things simple until some later more comprehensive version can be made. Also note that in an even more generalized version that sourceSet could be a VBitSet when targetSet is not nil -- which I suspect would also be very useful to some including myself sooner or later. > > Now tell me, that BinaryLinks with order beat > ANYTHING that RDBMS world can offer :-)) > From sunshine at public.kherson.ua Thu Dec 15 18:46:30 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 10:47:15 2005 Subject: VArraySet.Lookup Re: How to sort b sequence? FW: Order of returned VArraySet rids when using FindLinked with a VArraySet arg. In-Reply-To: Message-ID: On 12/15/05 6:30 PM, "Ed Kleban" wrote: >> I think this is only a way until we give you power of BinaryLink Ordered >> > > Yeah, but Ordered BinaryLink (OBL?) is not something that you want to rush. > This needs a lot of thought, coding, testing, and beta testing before it > you'll want to make this available. Here few aspects. API way -- is simple todo. Very simple and we will start from this. Much harder develop SQL around this. So we can do 2 steps -- 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] From lists at mangomultimedia.com Thu Dec 15 14:23:38 2005 From: lists at mangomultimedia.com (Trevor DeVore) Date: Thu Dec 15 16:24:16 2005 Subject: Russian encoded text Message-ID: <0DD46E25-75BE-4CF8-9663-5ED6B1FD3D56@mangomultimedia.com> Hello, I have some text that is stored in a MySQL database that is encoded as Cyrillic-Win. I am exporting the database to Valentina 1.x for distribution with a Revolution application. I am doing the export from MySQL to Valentina on a mac. I fetch the records from MySQL, translate the strings from Cyrillic-Win to Cyrillic-Mac and insert them into a Valentina database. The language of the fields in the Valentina database are set to Russian. When I view the text retrieved from the Valentina database on Mac OS X everything looks fine. When I view the text from Valentina on Windows I get gibberish. For example, character 130 in the Cyrillic Mac table is showing up as character 199 on Windows. I guess my question is what kind of conversion is Valentina doing in the background with Russian text? Thanks, -- Trevor DeVore Blue Mango Multimedia trevor@mangomultimedia.com From sunshine at public.kherson.ua Fri Dec 16 01:15:26 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 15 17:16:11 2005 Subject: Russian encoded text In-Reply-To: <0DD46E25-75BE-4CF8-9663-5ED6B1FD3D56@mangomultimedia.com> Message-ID: On 12/16/05 12:23 AM, "Trevor DeVore" wrote: Hi Trevor, > I have some text that is stored in a MySQL database that is encoded > as Cyrillic-Win. > I am exporting the database to Valentina 1.x for distribution with a > Revolution application. I am doing the export from MySQL to Valentina on a > mac. > > I fetch the records from MySQL, translate the strings from Cyrillic-Win to > Cyrillic-Mac and insert them into a Valentina database. The language of the > fields in the Valentina database are set to Russian. ok > When I view the text retrieved from the Valentina database on Mac OS > X everything looks fine. When I view the text from Valentina on > Windows I get gibberish. For example, character 130 in the Cyrillic > Mac table is showing up as character 199 on Windows. > I guess my question is what kind of conversion is Valentina doing in > the background with Russian text? Trevor, Valentina 1.x do automatic mapping of text when you move files cross-platform, but only for Roman group (this is 14 languages). Cyrillic is not supported her. Valentina 2.x will do this correctly for any from 200+ encodings -- 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] From lists at mangomultimedia.com Thu Dec 15 17:26:46 2005 From: lists at mangomultimedia.com (Trevor DeVore) Date: Thu Dec 15 19:27:21 2005 Subject: Russian encoded text In-Reply-To: References: Message-ID: <7B5A861E-FDC8-45BD-977C-A55DDEA5AB79@mangomultimedia.com> On Dec 15, 2005, at 3:15 PM, Ruslan Zasukhin wrote: >> I guess my question is what kind of conversion is Valentina doing in >> the background with Russian text? > > Trevor, Valentina 1.x do automatic mapping of text when you move files > cross-platform, but only for Roman group (this is 14 languages). > Cyrillic is not supported her. > > Valentina 2.x will do this correctly for any from 200+ encodings Ruslan, I exported the database on Windows and everything works great now. I will just use one database for macs and another for windows. Thanks, -- Trevor DeVore Blue Mango Multimedia trevor@mangomultimedia.com From Ed at Kleban.com Thu Dec 15 22:10:21 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 22:10:56 2005 Subject: FindValueAsArraySet ordering Message-ID: Hi Ruslan, I know we've talked about FindLinked, but I don't recall if I've asked about FindValueAsArraySet with an inSet argument. If so I can't find the answer in my email history. If I call FindValueAsArraySet with an inSet argument, what is the order of the elements in the result? Examples seem to work best for us in these discussions: matchValue = 69 checkSet = VArraySet with: { 5, 1, 4, 3 } someField has values: Rid someField 1 69 2 69 3 69 4 69 5 21 resultVArraySet = someField.FindValueAsArraySet( matchValue, checkSet ) Does resultVArraySet = { 1, 4, 3 } or Does resultVArraySet = { 1, 3, 4 } Thanks! --Ed From Ed at Kleban.com Thu Dec 15 23:52:33 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 15 23:53:11 2005 Subject: VArraySet.Remove order Message-ID: How does aVArraySet.Remove( aRecId ) affect the relative order of the other RecIDs that are not removed? If I have: aVArraySet = { 1, 9, 2, 7, 4, 6 } Then is the following always true? aVArraySet.Remove( 7 ) => { 1, 9, 2, 4, 6 } --Ed From sunshine at public.kherson.ua Fri Dec 16 10:23:25 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 16 02:24:09 2005 Subject: defragment/compact In-Reply-To: <05eb11d763699317aac2e4aa08ff293c@shaw.ca> Message-ID: On 12/16/05 4:27 AM, "Charles Cohen" wrote: > Original db size = 2723840 > > Defragment/Compact = 2723840 > > Dump/Load = 2428928 > > Conclusion...is dumping/loading back-to-back advisable > ie: make a new dumped backup then restore it immediately to effectively > defragment/compact it? Defragment -- do not change size. Only order of internal files Compact -- remove empty segments which you can get after drop field/table. Dump/Load + Clone -- they removed ALL deleted records, this require corrections of objectPtr values and links. -- 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] From sunshine at public.kherson.ua Fri Dec 16 10:50:22 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 16 02:51:07 2005 Subject: FindValueAsArraySet ordering In-Reply-To: Message-ID: On 12/16/05 6:10 AM, "Ed Kleban" wrote: > Hi Ruslan, > > I know we've talked about FindLinked, but I don't recall if I've asked about > FindValueAsArraySet with an inSet argument. If so I can't find the answer > in my email history. > > > If I call FindValueAsArraySet with an inSet argument, what is the order of > the elements in the result? > > Examples seem to work best for us in these discussions: > > matchValue = 69 > checkSet = VArraySet with: { 5, 1, 4, 3 } > someField has values: > > Rid someField > 1 69 > 2 69 > 3 69 > 4 69 > 5 21 > > resultVArraySet = someField.FindValueAsArraySet( matchValue, checkSet ) > > > Does resultVArraySet = { 1, 4, 3 } > > or > > Does resultVArraySet = { 1, 3, 4 } You know, problems... As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet. That was enough for our SQL engine... But of course in ideal we should support ArraySet also. This have sense. And result will be for ArraySet { 1, 4, 3 } for BitSet { 1 3 4 } Because algorithm just iterate set forward. -- 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] From sunshine at public.kherson.ua Fri Dec 16 10:50:40 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 16 02:51:25 2005 Subject: VArraySet.Remove order In-Reply-To: Message-ID: On 12/16/05 7:52 AM, "Ed Kleban" wrote: > > How does aVArraySet.Remove( aRecId ) affect the relative order of the other > RecIDs that are not removed? > > If I have: > > aVArraySet = { 1, 9, 2, 7, 4, 6 } > > Then is the following always true? > > aVArraySet.Remove( 7 ) => { 1, 9, 2, 4, 6 } Yes -- 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] From Ed at Kleban.com Fri Dec 16 08:14:20 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 16 08:14:56 2005 Subject: FindValueAsArraySet ordering In-Reply-To: Message-ID: On 12/16/05 2:50 AM, "Ruslan Zasukhin" wrote: > On 12/16/05 6:10 AM, "Ed Kleban" wrote: > >> Hi Ruslan, >> >> I know we've talked about FindLinked, but I don't recall if I've asked about >> FindValueAsArraySet with an inSet argument. If so I can't find the answer >> in my email history. >> >> >> If I call FindValueAsArraySet with an inSet argument, what is the order of >> the elements in the result? >> >> Examples seem to work best for us in these discussions: >> >> matchValue = 69 >> checkSet = VArraySet with: { 5, 1, 4, 3 } >> someField has values: >> >> Rid someField >> 1 69 >> 2 69 >> 3 69 >> 4 69 >> 5 21 >> >> resultVArraySet = someField.FindValueAsArraySet( matchValue, checkSet ) >> >> >> Does resultVArraySet = { 1, 4, 3 } >> >> or >> >> Does resultVArraySet = { 1, 3, 4 } > > You know, problems... > > As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet. No! I did not know this!!!! I know that I discovered, and we agreed, that FindLinked accepts (inSet as VSet) [and therefore I assumed accepts either a VBitSet or VArraySet], however it only returns a VBitSet. But FindValueAsArraySet DOES return a VArraySet, and both every line of documentation in the Reference manual and the parameters shown by autocomplete ALL state that the argument it takes is ( inSelection as VSet ). Are you now telling me that all of these a wrong? Are you telling me that even though all of these say (inSelection as VSet ) that the API calls check to make sure the VSet argument is actually a VBitSet and NOT a VArraySet and will in fact fail if the argument is a VArraySet? > That was enough for our SQL engine... > But of course in ideal we should support ArraySet also. This have sense. > And result will be > for ArraySet { 1, 4, 3 } > > for BitSet { 1 3 4 } > > Because algorithm just iterate set forward. > Or are you saying that the result will be what you show above eventually but is different now? So please confirm Ruslan, are you SURE about this: > As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet. From Ed at Kleban.com Fri Dec 16 15:09:33 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 16 15:10:15 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: On 12/13/05 3:54 AM, "Ruslan Zasukhin" wrote: > On 12/13/05 11:33 AM, "Dave Addey" wrote: > >> Good news - I got this to work! But, selecting / sorting on the method >> field takes much longer, as the method has to be calculated on the fly. > > Mark it as indexed. > > Then will be faster > Why is that Ruslan? It it because the index gets retained even though the calculated values do not? So then when you add a new record I guess it has to recalculate for the calculated fields that are near (in the index) the value for the record you are adding? Makes sense. From sunshine at public.kherson.ua Fri Dec 16 23:38:48 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 16 15:39:33 2005 Subject: FindValueAsArraySet ordering In-Reply-To: Message-ID: On 12/16/05 4:14 PM, "Ed Kleban" wrote: >> You know, problems... >> >> As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet. > > No! I did not know this!!!! > > I know that I discovered, and we agreed, that FindLinked accepts > (inSet as VSet) [and therefore I assumed accepts either a VBitSet or > VArraySet], however it only returns a VBitSet. > > But FindValueAsArraySet DOES return a VArraySet, and both every line of > documentation in the Reference manual and the parameters shown by > autocomplete ALL state that the argument it takes is > ( inSelection as VSet ). > > Are you now telling me that all of these a wrong? It is not complete idea. In C++ level we have only BitSet for this method. When I have write V4RB, I have to think: why only bitSet. And specify Set. But ArraySet will not work yet. -- 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] From sunshine at public.kherson.ua Fri Dec 16 23:41:00 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 16 15:41:43 2005 Subject: FindValueAsArraySet ordering In-Reply-To: Message-ID: On 12/16/05 4:14 PM, "Ed Kleban" wrote: > Are you telling me that even though all of these say (inSelection as VSet ) > that the API calls check to make sure the VSet argument is actually a > VBitSet and NOT a VArraySet and will in fact fail if the argument is a > VArraySet? Some methods. >> That was enough for our SQL engine... >> But of course in ideal we should support ArraySet also. This have sense. > >> And result will be >> for ArraySet { 1, 4, 3 } >> >> for BitSet { 1 3 4 } >> >> Because algorithm just iterate set forward. >> > > Or are you saying that the result will be what you show above eventually but > is different now? Yes. ArraySet will not work now. > So please confirm Ruslan, are you SURE about this: > >> As I see FindValueAsArraySet() expect to see CheckSet to be only BitSet. Yes. Not complete function. To compete we need many enough work. Not 5 minutes. May be day or two. -- 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] From sunshine at public.kherson.ua Fri Dec 16 23:42:32 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 16 15:43:16 2005 Subject: UTF sorting and blank fields, and UTF-8 In-Reply-To: Message-ID: On 12/16/05 11:09 PM, "Ed Kleban" wrote: >>> Good news - I got this to work! But, selecting / sorting on the method >>> field takes much longer, as the method has to be calculated on the fly. >> >> Mark it as indexed. >> >> Then will be faster >> > > Why is that Ruslan? It it because the index gets retained even though the > calculated values do not? EXACTLY ! In Valentina Kernel.pdf pointed Methods allow you have one field and around SEVERAL indexes based on this field. > So then when you add a new record I guess it has to recalculate for the > calculated fields that are near (in the index) the value for the record you > are adding? right > Makes sense. -- 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] From dvk at dvkconsult.com.au Sat Dec 17 13:57:55 2005 From: dvk at dvkconsult.com.au (David Vaughan) Date: Fri Dec 16 20:58:38 2005 Subject: Opening Valentina v1.11 in Revolution Message-ID: <73DD0096-5AA1-4620-9B10-3FE2DC32FE02@dvkconsult.com.au> Hello, a simple starter question. I am developing a comparatively small database in the sense that the data volume will not be huge, although it will comprise around 12-14 tables. I have started using SQLite but thought I would compare using Valentina. However, this is proving less convenient because so far Valentina will not run! I can open Valentina from RunRev using the Valentina XCMD but not using , which looks like this: get revOpenDatabase("Valentina","",DBpath,,,,valentinaSerial,"") DBpath and valentinaSerial are set in the exactly same manner as in the successful XCMD method. The Rev function returns "invalid database type". I have VXCMD_Macho_MC in the main Revolution folder, based on what I have read in the RunRev archives. Its location is /Applications/ Revolution 2.6.1/VXCMD_Macho_MC I have set the externals of the stack to that path and verified that the property is set correctly after a closing and re-opening the stack. Is that correct? Is there another step I am missing? The platform is Max OS X 10.4.3 thanks David From sunshine at public.kherson.ua Sat Dec 17 11:37:09 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 03:37:57 2005 Subject: Database for testing, Unique in v1 is not unique in v2. In-Reply-To: <1241735140.20051217015143@public.kherson.ua> Message-ID: On 12/17/05 1:51 AM, "Ivan Smahin" wrote: HI Ivan, HI Stan > SB> Ruslan asked me to send you the database I have problems to convert. > SB> It is available here: http://www.maxprog.com/misc/valentina/ > SB> Database_ConvertCrash.zip > > SB> Converting this v1 database to v2 I get: > > SB> ERROR: 0x23503 Attempt to insert duplicate key row in object > SB> "GroupList" with unique index "U_GroupList_GroupList_GroupID". > > SB> It refers to a field that is set a VUnique in v1 however v1_to_v2 > SB> converter finds duplicates. The index has been rebuilt. > > SB> Problem is that such file in now unconvertible because: > > SB> With Valentina.ThrowExceptions = True, I get the VException. > SB> With Valentina.ThrowExceptions = False, I get a crash. > > SB> Please feel free to contact me if you need anything else that may > SB> help you to sort that out. > > At least you may consider such steps as temporary workaround: > > 1. 1.x version - Remove Unique flag from the GropID field. > 2. Perform Convert_1_2. > 3. 2.x version - Set collator strength to UCOL_IDENTICAL value for this field. > 4. 2.x version - Make it unique. > > The problem: > GroupID is a string unique field. It contains some local-specific data. > For some records the data could be considered as equal > (UCOL_DEFAULT_STRENGTH is not so strict as UCOL_IDENTICAL). > > Example: > RecID 1300 considered as EQUAL for RecID 44 ( UCOL_DEFAULT_STRENGTH) > RecID 2504 considered as EQUAL for RecID 842 > ... > > and so on.. Aha, so problem is Valentina 1.x have use binary compare of strings, But Valentina 2.x uses language local rules. And right, collator option UCOL_IDENTICAL is almost binary compare. Ivan, can you show also VALUES of e.g. 1300 and 44 records? Interesting to see what they are. -- 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] From sunshine at public.kherson.ua Sat Dec 17 11:57:07 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 03:57:59 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: <73DD0096-5AA1-4620-9B10-3FE2DC32FE02@dvkconsult.com.au> Message-ID: On 12/17/05 4:57 AM, "David Vaughan" wrote: Hi David, Hi Marcus, RevDB for Valentina have develop Runtime Revolution itself. So I think better ask what is wrong for rev team. IF I not mistake, Revolution in installation have some old 1.8.x version of VXCMD wrapped to RevDB. It seems to me RevDB will not work with VXCMD 1.11 (i.e. Newer version). David, I think that most VXCMD 1.x developers use not RevDB API, but native VXCMD functions, which actually give you more features which RebDB can do. > Hello, a simple starter question. > > I am developing a comparatively small database in the sense that the > data volume will not be huge, although it will comprise around 12-14 > tables. I have started using SQLite but thought I would compare using > Valentina. However, this is proving less convenient because so far > Valentina will not run! > > I can open Valentina from RunRev using the Valentina XCMD but not > using , which looks like this: > > get revOpenDatabase("Valentina","",DBpath,,,,valentinaSerial,"") > > DBpath and valentinaSerial are set in the exactly same manner as in > the successful XCMD method. > The Rev function returns "invalid database type". > I have VXCMD_Macho_MC in the main Revolution folder, based on what I > have read in the RunRev archives. Its location is /Applications/ > Revolution 2.6.1/VXCMD_Macho_MC > I have set the externals of the stack to that path and verified that > the property is set correctly after a closing and re-opening the stack. > > Is that correct? Is there another step I am missing? > The platform is Max OS X 10.4.3 -- 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] From dvk at dvkconsult.com.au Sat Dec 17 21:13:02 2005 From: dvk at dvkconsult.com.au (David Vaughan) Date: Sat Dec 17 04:13:44 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: References: Message-ID: <1FF25004-6482-428B-813E-5CAC04D59A60@dvkconsult.com.au> Ruslan Thanks, I know I can do it with Valentina calls but I am a little surprised. Have you and RunRev not just promoted a free Valentina v1.12 with new Revolution purchases? I did not notice any caveats on how it worked. Anyway, another question. I understood that the MacOSX version of Valentina included a licence to run Valentina Carbon, the database editor. However, it times out after ten minutes and the key for Valentina is not accepted by it. I could not find the editor or any licensing for it on the paradigmasoft web site. Is it separately licensed or is it included? In either case, how do I make it happen please? regards David On 17/12/2005, at 20:57, Ruslan Zasukhin wrote: > On 12/17/05 4:57 AM, "David Vaughan" wrote: > > Hi David, > Hi Marcus, > > RevDB for Valentina have develop Runtime Revolution itself. > So I think better ask what is wrong for rev team. > > IF I not mistake, Revolution in installation have some old 1.8.x > version of > VXCMD wrapped to RevDB. > > It seems to me RevDB will not work with VXCMD 1.11 (i.e. Newer > version). > > David, I think that most VXCMD 1.x developers use not RevDB API, > but native > VXCMD functions, which actually give you more features which RebDB > can do. > > >> Hello, a simple starter question. >> >> I am developing a comparatively small database in the sense that the >> data volume will not be huge, although it will comprise around 12-14 >> tables. I have started using SQLite but thought I would compare using >> Valentina. However, this is proving less convenient because so far >> Valentina will not run! >> >> I can open Valentina from RunRev using the Valentina XCMD but not >> using , which looks like this: >> >> get revOpenDatabase("Valentina","",DBpath,,,,valentinaSerial,"") >> >> DBpath and valentinaSerial are set in the exactly same manner as in >> the successful XCMD method. >> The Rev function returns "invalid database type". > >> I have VXCMD_Macho_MC in the main Revolution folder, based on what I >> have read in the RunRev archives. Its location is /Applications/ >> Revolution 2.6.1/VXCMD_Macho_MC > >> I have set the externals of the stack to that path and verified that >> the property is set correctly after a closing and re-opening the >> stack. >> >> Is that correct? Is there another step I am missing? >> The platform is Max OS X 10.4.3 > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Sat Dec 17 12:52:42 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 04:53:33 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: <1FF25004-6482-428B-813E-5CAC04D59A60@dvkconsult.com.au> Message-ID: On 12/17/05 12:13 PM, "David Vaughan" wrote: Hi David, > Thanks, I know I can do it with Valentina calls but I am a little > surprised. Have you and RunRev not just promoted a free Valentina > v1.12 with new Revolution purchases? I did not notice any caveats on > how it worked. I still can be wrong about RevDB. But note, Valentina XCMD was born with its API much before RevDB was introduced in Revolution. VXCMD work not only with Revolution, but with Metcard (its father :-) And Hypercard and SuperCard. So RevDB was just addition to VXCMD. It is not primary API of access. RevDB for example do not allow you have encrypted database, and use other db-specific features. RevDB try generalize API for all. > Anyway, another question. I understood that the MacOSX version of > Valentina included a licence to run Valentina Carbon, the database > editor. However, it times out after ten minutes and the key for > Valentina is not accepted by it. I could not find the editor or any > licensing for it on the paradigmasoft web site. Is it separately > licensed or is it included? In either case, how do I make it happen > please? Valentina APPlication (VAPP) is not included into Revolution offer. VAPP is bundled only with VXCMD mac+win option. You can download, use and purchase Valentina Studio, This is new application which still have plugin to work with 1.x dbs. It work on mac and windows, it can connect work as with local dbs so with Valentina Server dbs, it have ODBC import and other features which are absent in VAPP. -- 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] From listmail1 at dsl.pipex.com Fri Dec 16 17:31:36 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Sat Dec 17 10:29:23 2005 Subject: Two cursors accessing the same records Message-ID: Hi there, Is it safe for me to have one cursor open on a table, accessing various records for read only, and then to open another cursor for one record in the table, to read and update its values? Will the first cursor?s values get updated when I UpdateRecord in the second cursor? What locks, if any, should I put in place? Thanks in advance for any advice, Dave. (RB 5.5.5, V4RB 2.0.5, Mac OS 10.4.3, Mach-O compile.) From sunshine at public.kherson.ua Sat Dec 17 18:37:57 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 10:38:44 2005 Subject: Two cursors accessing the same records In-Reply-To: Message-ID: On 12/16/05 7:31 PM, "Dave Addey" wrote: Hi Dave, > Hi there, > > Is it safe for me to have one cursor open on a table, accessing various > records for read only, and then to open another cursor for one record in the > table, to read and update its values? Second cursor will be able do this only for a record(s) not selected by first cursor. You cannot get WRITE lock on a record which have at least one reader. > Will the first cursor?s values get updated when I UpdateRecord in the second > cursor? > What locks, if any, should I put in place? Well, you can get behavior which you describe if you will do curs1 = db.Select( query, kServerSide, kNoLocks ) curs2 = db.Select( query, kServerSide, kReadWrite ) So first cursor do not lock records at all. YES first cursor will see changes made by second cursor. This is like transaction mode: DIRTY READ. -- 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] From cbpelto at pcisys.net Sat Dec 17 11:27:24 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Sat Dec 17 12:28:02 2005 Subject: GetRecID() Bug? Message-ID: <52F5ADC1-C87D-4905-8DF5-8740B9469F0E@pcisys.net> In compiling V4RB2 and using a call of GetRecID() to retrieve a record ID of a newly added record, I'm getting an error that says the GetRecID() method does not exist. However, on page V4RBRef-117, it's in there. Is this a typo? Should the call be RecID()? That gets past the compile error. From Claudius at sailer-online.de Sat Dec 17 20:13:06 2005 From: Claudius at sailer-online.de (Claudius Sailer) Date: Sat Dec 17 13:13:51 2005 Subject: GetRecID() Bug? In-Reply-To: <52F5ADC1-C87D-4905-8DF5-8740B9469F0E@pcisys.net> References: <52F5ADC1-C87D-4905-8DF5-8740B9469F0E@pcisys.net> Message-ID: <8730C4B1-1AD7-4AF8-9248-41BE998DB49D@sailer-online.de> Hi, Am 17. Dez 2005 um 19:27 Uhr schrieb Chuck Pelto: > In compiling V4RB2 and using a call of GetRecID() to retrieve a > record ID of a newly added record, I'm getting an error that says > the GetRecID() method does not exist. > > However, on page V4RBRef-117, it's in there. > > Is this a typo? Should the call be RecID()? That gets past the > compile error. this is one thing which is changed from VrRB1 to V4RB2 NewRecID=meineDatenbank.TBuchungen.addRecord meineDatenbank.TDepot.Buchung_ID.value=NewRecID addRecord send back the newRecID :-)) bye Claudius -- G4/733 QS / MacOS X 10.4de / RB 2005r4/ Valentina 1.10.0 & 2.0.4 Homepage http://www.ClaSai.de iChat ryhoruk RealBasic ListBoxes: [ I feel the need...the need for speed!!! ] From cbpelto at pcisys.net Sat Dec 17 12:17:41 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Sat Dec 17 13:18:18 2005 Subject: GetRecID() Bug? In-Reply-To: <8730C4B1-1AD7-4AF8-9248-41BE998DB49D@sailer-online.de> References: <52F5ADC1-C87D-4905-8DF5-8740B9469F0E@pcisys.net> <8730C4B1-1AD7-4AF8-9248-41BE998DB49D@sailer-online.de> Message-ID: In that case, I'd recommend someone update the documentation, as it is still using the old call. On Dec 17, 2005, at 12:13 PM, Claudius Sailer wrote: > Hi, > > Am 17. Dez 2005 um 19:27 Uhr schrieb Chuck Pelto: > >> In compiling V4RB2 and using a call of GetRecID() to retrieve a >> record ID of a newly added record, I'm getting an error that says >> the GetRecID() method does not exist. >> >> However, on page V4RBRef-117, it's in there. >> >> Is this a typo? Should the call be RecID()? That gets past the >> compile error. > > this is one thing which is changed from VrRB1 to V4RB2 > > > NewRecID=meineDatenbank.TBuchungen.addRecord > > meineDatenbank.TDepot.Buchung_ID.value=NewRecID > > addRecord send back the newRecID :-)) > > bye > > > Claudius > > -- > G4/733 QS / MacOS X 10.4de / RB 2005r4/ Valentina 1.10.0 & 2.0.4 > Homepage http://www.ClaSai.de > iChat ryhoruk > RealBasic ListBoxes: [ I feel the need...the need for speed!!! ] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina > From sunshine at public.kherson.ua Sat Dec 17 21:19:34 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 13:20:21 2005 Subject: GetRecID() Bug? In-Reply-To: <8730C4B1-1AD7-4AF8-9248-41BE998DB49D@sailer-online.de> Message-ID: On 12/17/05 9:13 PM, "Claudius Sailer" wrote: >> In compiling V4RB2 and using a call of GetRecID() to retrieve a >> record ID of a newly added record, I'm getting an error that says >> the GetRecID() method does not exist. >> >> However, on page V4RBRef-117, it's in there. Instead now exists VTable.RecID property. >> Is this a typo? Should the call be RecID()? That gets past the >> compile error. > > this is one thing which is changed from VrRB1 to V4RB2 > > > NewRecID=meineDatenbank.TBuchungen.addRecord > > meineDatenbank.TDepot.Buchung_ID.value=NewRecID > > addRecord send back the newRecID :-)) right -- 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] From sunshine at public.kherson.ua Sat Dec 17 21:27:34 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 13:28:21 2005 Subject: GetRecID() Bug? In-Reply-To: Message-ID: On 12/17/05 9:17 PM, "Chuck Pelto" wrote: > In that case, I'd recommend someone update the documentation, as it > is still using the old call. >>> In compiling V4RB2 and using a call of GetRecID() to retrieve a >>> record ID of a newly added record, I'm getting an error that says >>> the GetRecID() method does not exist. >>> >>> However, on page V4RBRef-117, it's in there. I think you use some old document. In fresh one page 117 contains VLOB class description. -- 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] From lfredricks at proactive-intl.com Sat Dec 17 12:52:01 2005 From: lfredricks at proactive-intl.com (Lynn Fredricks) Date: Sat Dec 17 14:52:55 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: <1FF25004-6482-428B-813E-5CAC04D59A60@dvkconsult.com.au> Message-ID: <20051217205206.27F88125FDE@spork.dreamhost.com> Hi David, Valentina app isnt included in that offer. Are you running into a problem only with initialization or something else? Just an FYI but theres a tutorial coming in February's MacFormat magazine :-) Best regards, Lynn Fredricks President Paradigma Software, Inc Joining Worlds of Information Deploy True Client-Server Database Solutions Royalty Free with Valentina Developer Network http://www.paradigmasoft.com > -----Original Message----- > From: valentina-bounces@lists.macserve.net > [mailto:valentina-bounces@lists.macserve.net] On Behalf Of > David Vaughan > Sent: Saturday, December 17, 2005 2:13 AM > To: Valentina Developers > Subject: Re: Opening Valentina v1.11 in Revolution > > Ruslan > > Thanks, I know I can do it with Valentina calls but I am a > little surprised. Have you and RunRev not just promoted a > free Valentina > v1.12 with new Revolution purchases? I did not notice any > caveats on how it worked. > > Anyway, another question. I understood that the MacOSX > version of Valentina included a licence to run Valentina > Carbon, the database editor. However, it times out after ten > minutes and the key for Valentina is not accepted by it. I > could not find the editor or any licensing for it on the > paradigmasoft web site. Is it separately licensed or is it > included? In either case, how do I make it happen please? > > regards > David > > On 17/12/2005, at 20:57, Ruslan Zasukhin wrote: > > > On 12/17/05 4:57 AM, "David Vaughan" wrote: > > > > Hi David, > > Hi Marcus, > > > > RevDB for Valentina have develop Runtime Revolution itself. > > So I think better ask what is wrong for rev team. > > > > IF I not mistake, Revolution in installation have some old 1.8.x > > version of VXCMD wrapped to RevDB. > > > > It seems to me RevDB will not work with VXCMD 1.11 (i.e. Newer > > version). > > > > David, I think that most VXCMD 1.x developers use not RevDB > API, but > > native VXCMD functions, which actually give you more features which > > RebDB can do. > > > > > >> Hello, a simple starter question. > >> > >> I am developing a comparatively small database in the > sense that the > >> data volume will not be huge, although it will comprise > around 12-14 > >> tables. I have started using SQLite but thought I would > compare using > >> Valentina. However, this is proving less convenient because so far > >> Valentina will not run! > >> > >> I can open Valentina from RunRev using the Valentina XCMD but not > >> using , which looks like this: > >> > >> get revOpenDatabase("Valentina","",DBpath,,,,valentinaSerial,"") > >> > >> DBpath and valentinaSerial are set in the exactly same > manner as in > >> the successful XCMD method. > >> The Rev function returns "invalid database type". > > > >> I have VXCMD_Macho_MC in the main Revolution folder, based > on what I > >> have read in the RunRev archives. Its location is /Applications/ > >> Revolution 2.6.1/VXCMD_Macho_MC > > > >> I have set the externals of the stack to that path and > verified that > >> the property is set correctly after a closing and re-opening the > >> stack. > >> > >> Is that correct? Is there another step I am missing? > >> The platform is Max OS X 10.4.3 > > > > -- > > 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] > > > > > > _______________________________________________ > > Valentina mailing list > > Valentina@lists.macserve.net > > http://lists.macserve.net/mailman/listinfo/valentina > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina > From lists at mangomultimedia.com Sat Dec 17 13:32:29 2005 From: lists at mangomultimedia.com (Trevor DeVore) Date: Sat Dec 17 15:33:08 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: <73DD0096-5AA1-4620-9B10-3FE2DC32FE02@dvkconsult.com.au> References: <73DD0096-5AA1-4620-9B10-3FE2DC32FE02@dvkconsult.com.au> Message-ID: <1AFEAA7A-1507-453E-8436-7B1B100F8DAE@mangomultimedia.com> On Dec 16, 2005, at 6:57 PM, David Vaughan wrote: > Hello, a simple starter question. > > I am developing a comparatively small database in the sense that > the data volume will not be huge, although it will comprise around > 12-14 tables. I have started using SQLite but thought I would > compare using Valentina. However, this is proving less convenient > because so far Valentina will not run! > > I can open Valentina from RunRev using the Valentina XCMD but not > using , which looks like this: > > get revOpenDatabase("Valentina","",DBpath,,,,valentinaSerial,"") > > DBpath and valentinaSerial are set in the exactly same manner as in > the successful XCMD method. > The Rev function returns "invalid database type". Hi David, I would suggest avoiding RevDB when using Valentina. As Ruslan said, RevDB doesn't use the latest version of Valentina and it doesn't give you access to the Valentina API. I use Valentina quite a bit and SQLite on occasion. What I did was build a wrapper around revdb and the Valentina external which handles database connection, record fetching, updating and adding. libDatabase uses revdb for everything except Valentina. For Valentina you use the XCMD. You can take a look at the library here: http://www.mangomultimedia.com/developer/revolution/ I would recommend the 2.0 beta version. The library will make it easier to experiment with the Valentina and if you decide to use it you can still exploit the Valentina API if you want. To use libDatabse with Valentina you just need to make sure the Valentina XCMD is loaded and that the handlers are available in the message path. I recommend that you use the stack that the external is attached to as a library (start using stack "MyValentinaExternalStack"). I don't have a version available for Valentina 2.0 yet but it is in testing. If you have any questions let me know. -- Trevor DeVore Blue Mango Multimedia trevor@mangomultimedia.com From dvk at dvkconsult.com.au Sun Dec 18 08:46:21 2005 From: dvk at dvkconsult.com.au (David Vaughan) Date: Sat Dec 17 15:47:05 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: <1AFEAA7A-1507-453E-8436-7B1B100F8DAE@mangomultimedia.com> References: <73DD0096-5AA1-4620-9B10-3FE2DC32FE02@dvkconsult.com.au> <1AFEAA7A-1507-453E-8436-7B1B100F8DAE@mangomultimedia.com> Message-ID: <4E6AE5EE-09D2-4394-B235-FF1EB3BC7AD3@dvkconsult.com.au> Thanks Trevor. I am happy enough to know that there is no fault of mine in the RevDB access not working. I had already been considering writing a wrapper around Valentina calls and I will certainly have a look at your libDatabase which appears more sophisticated (being product- impartial) than I had intended to build. For testing I will stick to using the XCMD directly. As explained, I have already tried that successfully. Ruslan, thanks for the information. I will old off new purchases while I test the claims of the existing ones :-) It is enough that I have already bought two databases where I will need only one so three looks a trifle excessive :-D regards David On 18/12/2005, at 8:32, Trevor DeVore wrote: > > Hi David, > > I would suggest avoiding RevDB when using Valentina. As Ruslan > said, RevDB doesn't use the latest version of Valentina and it > doesn't give you access to the Valentina API. I use Valentina > quite a bit and SQLite on occasion. What I did was build a wrapper > around revdb and the Valentina external which handles database > connection, record fetching, updating and adding. libDatabase uses > revdb for everything except Valentina. For Valentina you use the > XCMD. You can take a look at the library here: > > http://www.mangomultimedia.com/developer/revolution/ > > I would recommend the 2.0 beta version. The library will make it > easier to experiment with the Valentina and if you decide to use it > you can still exploit the Valentina API if you want. To use > libDatabse with Valentina you just need to make sure the Valentina > XCMD is loaded and that the handlers are available in the message > path. I recommend that you use the stack that the external is > attached to as a library (start using stack > "MyValentinaExternalStack"). > > I don't have a version available for Valentina 2.0 yet but it is in > testing. > > If you have any questions let me know. > > -- > Trevor DeVore > Blue Mango Multimedia > trevor@mangomultimedia.com > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Sat Dec 17 23:47:47 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 17 15:48:35 2005 Subject: Opening Valentina v1.11 in Revolution In-Reply-To: <1AFEAA7A-1507-453E-8436-7B1B100F8DAE@mangomultimedia.com> Message-ID: On 12/17/05 11:32 PM, "Trevor DeVore" wrote: > I would suggest avoiding RevDB when using Valentina. As Ruslan said, > RevDB doesn't use the latest version of Valentina and it doesn't give > you access to the Valentina API. I use Valentina quite a bit and > SQLite on occasion. What I did was build a wrapper around revdb and > the Valentina external which handles database connection, record > fetching, updating and adding. libDatabase uses revdb for everything > except Valentina. For Valentina you use the XCMD. You can take a > look at the library here: > > http://www.mangomultimedia.com/developer/revolution/ Very good information Trevor. We need put it to site :-) Thank you. > I would recommend the 2.0 beta version. The library will make it > easier to experiment with the Valentina and if you decide to use it > you can still exploit the Valentina API if you want. To use > libDatabse with Valentina you just need to make sure the Valentina > XCMD is loaded and that the handlers are available in the message > path. I recommend that you use the stack that the external is > attached to as a library (start using stack "MyValentinaExternalStack"). > > I don't have a version available for Valentina 2.0 yet but it is in > testing. -- 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] From cbpelto at pcisys.net Sat Dec 17 17:32:13 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Sat Dec 17 18:32:54 2005 Subject: GetRecID() Bug? In-Reply-To: References: Message-ID: <1E57AB87-9DEF-4934-890D-F63463CA9981@pcisys.net> Hi Ruslan, On Dec 17, 2005, at 12:27 PM, Ruslan Zasukhin wrote: > I think you use some old document. Maybe, but it a document labelled V4RB_Reference_2_en.pdf > > In fresh one page 117 contains VLOB class description. I'll download another one. Regards, Chuck From Ed at Kleban.com Sat Dec 17 20:38:17 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sat Dec 17 20:38:59 2005 Subject: Doc Version Numbers Re: GetRecID() Bug? In-Reply-To: <1E57AB87-9DEF-4934-890D-F63463CA9981@pcisys.net> Message-ID: Ruslan, Can you please put a distinguishing version number and/or date on the title page of the documentation? An identifier in the filename would be even better. Thanks! --Ed On 12/17/05 6:32 PM, "Chuck Pelto" wrote: > Hi Ruslan, > > On Dec 17, 2005, at 12:27 PM, Ruslan Zasukhin wrote: > >> I think you use some old document. > > Maybe, but it a document labelled V4RB_Reference_2_en.pdf > >> >> In fresh one page 117 contains VLOB class description. > > > I'll download another one. > > Regards, > > Chuck > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Sun Dec 18 09:40:16 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 18 01:41:08 2005 Subject: Doc Version Numbers Re: GetRecID() Bug? In-Reply-To: Message-ID: On 12/18/05 4:38 AM, "Ed Kleban" wrote: Hi Ed, > Ruslan, > > Can you please put a distinguishing version number and/or date on the title > page of the documentation? An identifier in the filename would be even > better. Another point of synchronization -- source to errors. We have try find in inDesign feature as -- Automatic insert of data of generation, but nothing found. -- 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] From listmail1 at dsl.pipex.com Sun Dec 18 18:42:55 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Sun Dec 18 12:43:34 2005 Subject: Two cursors accessing the same records In-Reply-To: Message-ID: Hi Ruslan, Thank you! This seems to work well. This reminds me - I'm using V4RB 2.0.5 in a local-database-only setup (no client-server - just a local database). Should I use kServerSide for all of my cursors? Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Sat, 17 Dec 2005 18:37:57 +0200 > To: "valentina@lists.macserve.net" > Conversation: Two cursors accessing the same records > Subject: Re: Two cursors accessing the same records > > On 12/16/05 7:31 PM, "Dave Addey" wrote: > > Hi Dave, > >> Hi there, >> >> Is it safe for me to have one cursor open on a table, accessing various >> records for read only, and then to open another cursor for one record in the >> table, to read and update its values? > > Second cursor will be able do this only for a record(s) not selected by > first cursor. > > You cannot get WRITE lock on a record which have at least one reader. > >> Will the first cursor?s values get updated when I UpdateRecord in the second >> cursor? > >> What locks, if any, should I put in place? > > Well, you can get behavior which you describe if you will do > > curs1 = db.Select( query, kServerSide, kNoLocks ) > > curs2 = db.Select( query, kServerSide, kReadWrite ) > > So first cursor do not lock records at all. > > YES first cursor will see changes made by second cursor. > This is like transaction mode: DIRTY READ. > > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Sun Dec 18 22:11:24 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sun Dec 18 14:12:35 2005 Subject: Two cursors accessing the same records In-Reply-To: Message-ID: On 12/18/05 8:42 PM, "Dave Addey" wrote: Hi Dave, > Hi Ruslan, > > Thank you! This seems to work well. Good. > This reminds me - I'm using V4RB 2.0.5 in a local-database-only setup (no > client-server - just a local database). Should I use kServerSide for all of > my cursors? IF you need specify Locks parameter, then you need specify before cursorSide parameter. Right? Just note: IF to work with Vserver then only Server/Side cursor can be ReadWrite. this is why I write kServerSide. For Local db this is not so important..but still better to use correct params. -- 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] From cbpelto at pcisys.net Sun Dec 18 14:36:41 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Sun Dec 18 15:37:19 2005 Subject: GetRecID() Bug? In-Reply-To: <1E57AB87-9DEF-4934-890D-F63463CA9981@pcisys.net> References: <1E57AB87-9DEF-4934-890D-F63463CA9981@pcisys.net> Message-ID: Ach tso! A newly updated document. Dated two days ago. Thanks and.... Merry Christmas, Chuck On Dec 17, 2005, at 5:32 PM, Chuck Pelto wrote: > Hi Ruslan, > > On Dec 17, 2005, at 12:27 PM, Ruslan Zasukhin wrote: > >> I think you use some old document. > > Maybe, but it a document labelled V4RB_Reference_2_en.pdf > >> >> In fresh one page 117 contains VLOB class description. > > > I'll download another one. > > Regards, > > Chuck > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina > From Ed at Kleban.com Mon Dec 19 21:30:18 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 19 21:31:02 2005 Subject: RB bug encountered with possible V4RB connection. Message-ID: I just reported this bug as a beta error, but the problem also occurs for RB 2004 r4. I mention it here because the specific line in question is a Valentina call. I've not seen this problem before elsewhere in my code: http://realsoftware.com/feedback/viewreport.php?reportid=oeyhoauj Summary: Multiline continuation with underscores generates IDE exceptions and confusion Use of underscores at the ends of consecutive lines results in a variety of error conditions. The most common of these is the display of: "Internal error. An unhandled OutOfBoundsException exception has occurred. Please report to REAL software ... and restart the IDE as soon as you can." This occurs when single stepping into this statement from the debugger. Execution without breakpoints results in the app getting a NilObjectException. Quitting the compiled app with force-quit seems to make everything happy. This error occurs in 2006 r1b1 as well as 2005 r4 The following line compiles and executes fine: ptdInfoDb = self.allocateDatabase( "RI_InfoBase.vdb", EVStorageType.kRam, EVdbMode.kDscDatBlbInd ) However the following variation causes these problems: ptdInfoDb = self.allocateDatabase( _ "RI_InfoBase.vdb", _ EVStorageType.kRam, _ EVdbMode.kDscDatBlbInd _ ) Apparently even inclusion of a single line with "_" will cause this problem. The following also fails in RB 2005 r4: ptdInfoDb = self.allocateDatabase( _ "RI_InfoBase.vdb", EVStorageType.kRam, EVdbMode.kDscDatBlbInd ) From Ed at Kleban.com Mon Dec 19 21:43:39 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 19 21:44:27 2005 Subject: RB bug encountered with possible V4RB connection. In-Reply-To: Message-ID: Never mind. It turns out to be a single-stepping bug in the Debugger having nothing to do with Valentina code. On 12/19/05 9:30 PM, "Ed Kleban" wrote: > > I just reported this bug as a beta error, but the problem also occurs for RB > 2004 r4. I mention it here because the specific line in question is a > Valentina call. I've not seen this problem before elsewhere in my code: > > http://realsoftware.com/feedback/viewreport.php?reportid=oeyhoauj > Summary: Multiline continuation with underscores generates IDE exceptions > and confusion > > Use of underscores at the ends of consecutive lines results in a variety of > error conditions. The most common of these is the display of: "Internal > error. An unhandled OutOfBoundsException exception has occurred. Please > report to REAL software ... and restart the IDE as soon as you can." This > occurs when single stepping into this statement from the debugger. Execution > without breakpoints results in the app getting a NilObjectException. > Quitting the compiled app with force-quit seems to make everything happy. > > This error occurs in 2006 r1b1 as well as 2005 r4 > > The following line compiles and executes fine: > > ptdInfoDb = self.allocateDatabase( "RI_InfoBase.vdb", EVStorageType.kRam, > EVdbMode.kDscDatBlbInd ) > > However the following variation causes these problems: > > ptdInfoDb = self.allocateDatabase( _ > "RI_InfoBase.vdb", _ > EVStorageType.kRam, _ > EVdbMode.kDscDatBlbInd _ > ) > > Apparently even inclusion of a single line with "_" will cause this problem. > The following also fails in RB 2005 r4: > > ptdInfoDb = self.allocateDatabase( _ > "RI_InfoBase.vdb", EVStorageType.kRam, EVdbMode.kDscDatBlbInd ) > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From Ed at Kleban.com Mon Dec 19 23:18:30 2005 From: Ed at Kleban.com (Ed Kleban) Date: Mon Dec 19 23:19:15 2005 Subject: FindValue return values Message-ID: If FindValue or FindValueAsArraySet fails to find any matching values will then: Always return a non-nil VSet with VSet.count = 0? Always return nil? May return either of the above so you always have to test for both? Thanks! --Ed From sunshine at public.kherson.ua Tue Dec 20 10:35:23 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 02:36:09 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/20/05 7:18 AM, "Ed Kleban" wrote: > > If FindValue or FindValueAsArraySet fails to find any matching values will > then: > > Always return a non-nil VSet with VSet.count = 0? > > Always return nil? yes > May return either of the above so you always have to test for both? No. only nil. To avoid creation of object. -- 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] From listmail1 at dsl.pipex.com Tue Dec 20 14:45:13 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 08:45:57 2005 Subject: Vcomponents in Mach-O Package Message-ID: Hi all, Is there any way to get the Vcomponents recognised if they live in a folder in my RB Mach-O bundle? I?ve read on the lists that some people have this working for PEF bundles, but I have a Mach-O Package and I?ve not heard anyone get it working yet. I already copy several custom files into the Mach-O package after compile, so I?m happy to do this for Vcomponents too. But no matter where I put them, the application won?t find them on launch. I really, really hope that there?s a workaround for this ? there?s no way I can ship my application with an installer to put them in CFMSupport, and I?m not having 12 files / folders with shlb names in the same folder as my application. Please tell me there?s a solution! This is a make or break feature for me. Using V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile only, local database only Also, a question about ValentinaKernel_2_en.pdf, page 18: > Also part of ICU is file icudt30l.dat. It is on default is quite big (about 8 > MB). This file con- > tains information about all Locales of the world. It is possible to reduce > this file to 3.5 MB > if to remove not needed Locales. How? :-) Thanks, Dave. From sunshine at public.kherson.ua Tue Dec 20 17:10:48 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 09:11:31 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/20/05 4:45 PM, "Dave Addey" wrote: > Hi all, > > Is there any way to get the Vcomponents recognised if they live in a folder > in my RB Mach-O bundle? I?ve read on the lists that some people have this > working for PEF bundles, but I have a Mach-O Package and I?ve not heard > anyone get it working yet. > > I already copy several custom files into the Mach-O package after compile, > so I?m happy to do this for Vcomponents too. But no matter where I put > them, the application won?t find them on launch. > > I really, really hope that there?s a workaround for this ? there?s no way I > can ship my application with an installer to put them in CFMSupport, and I?m > not having 12 files / folders with shlb names in the same folder as my > application. Please tell me there?s a solution! This is a make or break > feature for me. > > Using V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile only, local > database only Dave, Probably you have miss thread with subject Re: [V4RB] Vcomponents in package. Solution ? - YES !!! This is one letters. Rest you can find in archive of list. ---------------------------- Aha, so easy !!! * I have download this App Bundler application. * then compile some V4RB example as PEF application * start App Bundler, - point compiled app - point required files from VComponents and set for them destination /Contents/MacOS - point where to build result package - press BUILD BUNDLE button. DONE. Now we get MODERN Apple Style Package Example.app And it works! ---------------------------- -- 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] From listmail1 at dsl.pipex.com Tue Dec 20 16:51:06 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 10:51:50 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: Hi Ruslan, No, I'd already read that thread and tried everything it suggests. The problem is that when you compile as a Mach-O application in REALbasic, the application is *already* a bundled .app folder, with the structure in place. So, AppBundler can't do anything with it. I think the Mach-O term for it is a Package rather than a Bundle, but the structure is essentially the same. If you compile a REALbasic project as a Mach-O app, and then right-click on the application in the Finder, you should have an option to "Show Package Contents". This opens the .app as a folder, and lets you look inside. I'm pretty comfortable with packages. I already have an applescript that will copy a .dylib file (for using HID input devices) into a /Contents/Frameworks/ folder once REALbasic has built the Mach-O application. To be honest, having worked with the "package" format, I wouldn't use AppBundler anyway, excellent as it is. I just do the file copying myself after I have comiled the Mach-O application. Here's a page from the Apple site, which talks about loading code at runtime for Mach-O: http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopi cs/Articles/loading_code.html My guess is that the V4RB plugin is looking for the files it needs in the executable application's folder (@executable_path) and looking in CFMSupport if it can't find them there first. What it *could* do instead is to: * Look in the application bundle's /Contents/Frameworks/ folder first * Look in the application's folder (as it does at the moment) * Look in the CFMSupport folder (as it does at the moment) My guess is that it isn't doing this first step, which is why it never finds my files. This would mean that we could copy the files inside the Mach-O Package if we wanted, and then the plugin code would check each location in turn at runtime until it found the files it needs. Hope this helps! Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Tue, 20 Dec 2005 17:10:48 +0200 > To: "valentina@lists.macserve.net" > Conversation: Vcomponents in Mach-O Package > Subject: Re: Vcomponents in Mach-O Package > > On 12/20/05 4:45 PM, "Dave Addey" wrote: > >> Hi all, >> >> Is there any way to get the Vcomponents recognised if they live in a folder >> in my RB Mach-O bundle? I?ve read on the lists that some people have this >> working for PEF bundles, but I have a Mach-O Package and I?ve not heard >> anyone get it working yet. >> >> I already copy several custom files into the Mach-O package after compile, >> so I?m happy to do this for Vcomponents too. But no matter where I put >> them, the application won?t find them on launch. >> >> I really, really hope that there?s a workaround for this ? there?s no way I >> can ship my application with an installer to put them in CFMSupport, and I?m >> not having 12 files / folders with shlb names in the same folder as my >> application. Please tell me there?s a solution! This is a make or break >> feature for me. >> >> Using V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile only, local >> database only > > Dave, > > Probably you have miss thread with subject > Re: [V4RB] Vcomponents in package. Solution ? - YES !!! > > This is one letters. Rest you can find in archive of list. > > > ---------------------------- > Aha, so easy !!! > > * I have download this App Bundler application. > > * then compile some V4RB example as PEF application > > * start App Bundler, > > - point compiled app > - point required files from VComponents and set for them destination > /Contents/MacOS > > - point where to build result package > > - press BUILD BUNDLE button. > > DONE. > > Now we get MODERN Apple Style Package Example.app > And it works! > ---------------------------- > > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From Ed at Kleban.com Tue Dec 20 10:53:04 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 20 10:53:50 2005 Subject: Valentina Studio - Top 10 Impressions Message-ID: Howdy. I finally got to a point today where I had enough database tables to get lost in amidst debugging and so I fired up Valentina Studio. After being less than impressed I then went looking for a newer version and downloaded the beta version 2.1fc1 Build Dec 18 2005, 13:43:33 for Mac OS X and was much more impressed. Here are my Top-10 initial reactions and comments: Central theme: The most scarce resource in any GUI application is screen space, and VS is very wasteful of it. 1) I can use the preference to change the font displayed in the Schema Browser, however that doesn't gain me any advantage vertically since it uses HUGE icons that take up about two lines of vertical space when I set the font small to say, 9 pt Geneva. 2) In Column view, if I resize the window tall to include all the rows the scroll bar disappears ? which is ok. If I then resize window to be short the scroll bars do not reappear, which is a problem when you have a lot of tables, especially since due to (1) above you can't gain back any screen real estate by using smaller fonts. 3) Setting font to a smaller or larger size appears to have no desirable benefits for the Data browsers. It appears to change the height of the header row, but does not change the size of the text displayed in any row. It can therefore not be used to make shorter lines to view more lines in the window, nor can it be used to see more characters across in headers for narrow columns. 4) Selecting the "List View" option for Schema Browser in Preferences appears to have no effect on newly opened browsers either before or after relaunching the VS App. 5) Icons at the bottom of the Data Browser window impart a minimum window width. My first preference would be for these to either be optional, or go away, or be stacked into two rows, or otherwise fixed so that I could make my windows much narrower and therefore get more windows for more tables all visible on the screen at the same time instead of having the right half of the Data Browser windows showing useless blank white space. If you display a Data Browser for a related table it gets even worse, because the "Related Table" tool bar doubles the minimum required width of the window. 6) That said, if GUI is going to steal massive amounts of otherwise-useful screen space from the user's display, the least it could do is put something useful in that space. By default all of the columns are displayed in a very narrow width that does not display either the full column headers, nor in many cases the full data content even when 80+% of the window space to the right of the displayed columns is blank white space that can note be eliminated due to (5). 7) Worse yet, column widths are not retained. So if I adjust the width of all the columns to make the headers and data visible and then change the "Table:" from the pop menu at the top of the window, then later return to this same table I then have to manually resize all of the columns once again. What an incredible pain in the rear! 8) I appreciate it that when I select a record, that one (unpredictable) field is highlighted. I do not appreciate the fact that it is highlighted in a manner such that if I type any character on the keyboard the contents is then CHANGED. I would far prefer to see it highlighted in a manner ? or not at all if I just click on a row number (recId) that requires me to explicitly click on the cell to begin cell editing. Especially since there is no UNDO so if I accidentally change a value and don?t recall its (potentially very long) previous value, there's no way to restore it. 8a) BTW when I change a field as described in (8) does VS immediately write the new value to the table? Or does it keep a local copy that is only flushed to disk for real when I do an explicit File Save operation? Since I don't see either a File Save or a File Save As on the menu I'm guessing that my database is instantly corrupted as soon as I type a character as described above in (8). 8b) Is there any way to use VS in a "read-only" mode, such as the way you can use BBEdit or TextWrangler. I of course opened VS on a copy of my database out of paranoia, but if I need to explicitly write protect a large database before using VS on it to protect myself it would be good to know. I was not able to find any available documentation for download on the VS tool. 9) I would really appreciate a non-metalic Schema Browser window, or at least an option for such. 10) The "Action" pop-up as the Finder window tool-tip calls it (button with gear icon) does not pop up on mouse click and hold as is the convention for this popup. It only opens upon unclick. Thanks! --Ed From listmail1 at dsl.pipex.com Tue Dec 20 16:55:39 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 10:56:23 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: One extra comment - I think the dyld path to the Frameworks folder would be: @executable_path/../Frameworks/ Dave. > From: Dave Addey > Reply-To: Valentina Developers > Date: Tue, 20 Dec 2005 16:51:06 +0000 > To: Valentina Developers > Conversation: Vcomponents in Mach-O Package > Subject: Re: Vcomponents in Mach-O Package > > Hi Ruslan, > > No, I'd already read that thread and tried everything it suggests. The > problem is that when you compile as a Mach-O application in REALbasic, the > application is *already* a bundled .app folder, with the structure in place. > So, AppBundler can't do anything with it. > > I think the Mach-O term for it is a Package rather than a Bundle, but the > structure is essentially the same. > > If you compile a REALbasic project as a Mach-O app, and then right-click on > the application in the Finder, you should have an option to "Show Package > Contents". This opens the .app as a folder, and lets you look inside. > > I'm pretty comfortable with packages. I already have an applescript that > will copy a .dylib file (for using HID input devices) into a > /Contents/Frameworks/ folder once REALbasic has built the Mach-O > application. > > To be honest, having worked with the "package" format, I wouldn't use > AppBundler anyway, excellent as it is. I just do the file copying myself > after I have comiled the Mach-O application. > > Here's a page from the Apple site, which talks about loading code at runtime > for Mach-O: > > http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopi > cs/Articles/loading_code.html > > My guess is that the V4RB plugin is looking for the files it needs in the > executable application's folder (@executable_path) and looking in CFMSupport > if it can't find them there first. What it *could* do instead is to: > > * Look in the application bundle's /Contents/Frameworks/ folder first > * Look in the application's folder (as it does at the moment) > * Look in the CFMSupport folder (as it does at the moment) > > My guess is that it isn't doing this first step, which is why it never finds > my files. > > This would mean that we could copy the files inside the Mach-O Package if we > wanted, and then the plugin code would check each location in turn at > runtime until it found the files it needs. > > Hope this helps! > > Dave. > >> From: Ruslan Zasukhin >> Reply-To: Valentina Developers >> Date: Tue, 20 Dec 2005 17:10:48 +0200 >> To: "valentina@lists.macserve.net" >> Conversation: Vcomponents in Mach-O Package >> Subject: Re: Vcomponents in Mach-O Package >> >> On 12/20/05 4:45 PM, "Dave Addey" wrote: >> >>> Hi all, >>> >>> Is there any way to get the Vcomponents recognised if they live in a folder >>> in my RB Mach-O bundle? I?ve read on the lists that some people have this >>> working for PEF bundles, but I have a Mach-O Package and I?ve not heard >>> anyone get it working yet. >>> >>> I already copy several custom files into the Mach-O package after compile, >>> so I?m happy to do this for Vcomponents too. But no matter where I put >>> them, the application won?t find them on launch. >>> >>> I really, really hope that there?s a workaround for this ? there?s no way I >>> can ship my application with an installer to put them in CFMSupport, and I?m >>> not having 12 files / folders with shlb names in the same folder as my >>> application. Please tell me there?s a solution! This is a make or break >>> feature for me. >>> >>> Using V4RB 2.0.5, RB 5.5.5, Mac OS 10.4.3, Mach-O compile only, local >>> database only >> >> Dave, >> >> Probably you have miss thread with subject >> Re: [V4RB] Vcomponents in package. Solution ? - YES !!! >> >> This is one letters. Rest you can find in archive of list. >> >> >> ---------------------------- >> Aha, so easy !!! >> >> * I have download this App Bundler application. >> >> * then compile some V4RB example as PEF application >> >> * start App Bundler, >> >> - point compiled app >> - point required files from VComponents and set for them destination >> /Contents/MacOS >> >> - point where to build result package >> >> - press BUILD BUNDLE button. >> >> DONE. >> >> Now we get MODERN Apple Style Package Example.app >> And it works! >> ---------------------------- >> >> >> -- >> 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] >> >> >> _______________________________________________ >> Valentina mailing list >> Valentina@lists.macserve.net >> http://lists.macserve.net/mailman/listinfo/valentina > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Tue Dec 20 19:53:38 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 11:54:21 2005 Subject: Valentina Studio - Top 10 Impressions In-Reply-To: Message-ID: On 12/20/05 6:53 PM, "Ed Kleban" wrote: > Howdy. > > I finally got to a point today where I had enough database tables to get > lost in amidst debugging and so I fired up Valentina Studio. After being > less than impressed I then went looking for a newer version and downloaded > the beta version 2.1fc1 Build Dec 18 2005, 13:43:33 for Mac OS X and was > much more impressed. Ed, For Valentina Studio discussion better to use Valentina-studio list. Please. :-) Subscription from our Support page. I will redirect your letter there for now -- 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] From Ed at Kleban.com Tue Dec 20 11:56:03 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 20 11:56:48 2005 Subject: AddRecord non-unique Message-ID: How do you detect if you have tried to add a record using API call AddRecord to a table with a non-unique field value for a field that is declared unique? Test for returned value of 0? Any other way? Any exceptions raised? From sunshine at public.kherson.ua Tue Dec 20 19:58:02 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 11:58:50 2005 Subject: Valentina Studio - Top 10 Impressions In-Reply-To: Message-ID: On 12/20/05 6:53 PM, "Ed Kleban" wrote: > Howdy. > > I finally got to a point today where I had enough database tables to get > lost in amidst debugging and so I fired up Valentina Studio. After being > less than impressed I then went looking for a newer version and downloaded > the beta version 2.1fc1 Build Dec 18 2005, 13:43:33 for Mac OS X and was > much more impressed. Btw, TOP - HIT features which was added last month are: * structure browser with Finder-like window * DataBrowser with MS Access/MS SQL behavior of data editing plus we have add few own keyboard shortcuts like on OS X * Related Data-Browser. Works for M : M binary links also * Filter in the data browser. Allow do multi-column filtering So make sure that you have check all these features. -- 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] From sunshine at public.kherson.ua Tue Dec 20 19:59:38 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 12:00:21 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/20/05 6:51 PM, "Dave Addey" wrote: Hi Dave, > Hi Ruslan, > > No, I'd already read that thread and tried everything it suggests. The > problem is that when you compile as a Mach-O application in REALbasic, the > application is *already* a bundled .app folder, with the structure in place. > So, AppBundler can't do anything with it. Macho app compiled by REALbasic do not work with current V4RB, because it is CARBON, Future we will make V4RB to be MACHO. For now only PEF way -- 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] From sunshine at public.kherson.ua Tue Dec 20 20:03:36 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 12:04:19 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/20/05 6:51 PM, "Dave Addey" wrote: Hi Dave, > No, I'd already read that thread and tried everything it suggests. The > problem is that when you compile as a Mach-O application in REALbasic, the > application is *already* a bundled .app folder, with the structure in place. > So, AppBundler can't do anything with it. What AppBundler cannot do for you ?? > I think the Mach-O term for it is a Package rather than a Bundle, but the > structure is essentially the same. > If you compile a REALbasic project as a Mach-O app, and then right-click on > the application in the Finder, you should have an option to "Show Package > Contents". This opens the .app as a folder, and lets you look inside. yes > I'm pretty comfortable with packages. I already have an applescript that > will copy a .dylib file (for using HID input devices) into a > /Contents/Frameworks/ folder once REALbasic has built the Mach-O > application. > > To be honest, having worked with the "package" format, I wouldn't use > AppBundler anyway, excellent as it is. I just do the file copying myself > after I have comiled the Mach-O application. > Here's a page from the Apple site, which talks about loading code at runtime > for Mach-O: > > http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopi > cs/Articles/loading_code.html > > My guess is that the V4RB plugin is looking for the files it needs in the > executable application's folder (@executable_path) and looking in CFMSupport > if it can't find them there first. What it *could* do instead is to: V4RB do not and cannot search in executable_path, because it is CARBON. > * Look in the application bundle's /Contents/Frameworks/ folder first > * Look in the application's folder (as it does at the moment) > * Look in the CFMSupport folder (as it does at the moment) > > My guess is that it isn't doing this first step, which is why it never finds > my files. > > This would mean that we could copy the files inside the Mach-O Package if we > wanted, and then the plugin code would check each location in turn at > runtime until it found the files it needs. If you download Valentina Studio or Valentina Server you will see that they have packages and VComponents inside. All right. The same we have for Valentina For Revolution, which is in MACHO format. But V4RB is CARBON for now. -- 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] From sunshine at public.kherson.ua Tue Dec 20 20:04:57 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 12:05:40 2005 Subject: AddRecord non-unique In-Reply-To: Message-ID: On 12/20/05 7:56 PM, "Ed Kleban" wrote: Hi Ed, > How do you detect if you have tried to add a record using API call AddRecord > to a table > with a non-unique field value for a field that is declared unique? > > Test for returned value of 0? > > Any other way? > > Any exceptions raised? If you TRY AddRecord, then yes exception If you want test before that use ValueExists() -- 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] From Ed at Kleban.com Tue Dec 20 12:11:13 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 20 12:11:58 2005 Subject: AddRecord non-unique In-Reply-To: Message-ID: Thanks, Please document this. On 12/20/05 12:04 PM, "Ruslan Zasukhin" wrote: > On 12/20/05 7:56 PM, "Ed Kleban" wrote: > > Hi Ed, > >> How do you detect if you have tried to add a record using API call AddRecord >> to a table >> with a non-unique field value for a field that is declared unique? >> >> Test for returned value of 0? >> >> Any other way? >> >> Any exceptions raised? > > If you TRY AddRecord, then yes exception > > If you want test before that use ValueExists() > From sunshine at public.kherson.ua Tue Dec 20 20:19:36 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 12:20:19 2005 Subject: AddRecord non-unique In-Reply-To: Message-ID: On 12/20/05 8:11 PM, "Ed Kleban" wrote: > Thanks, Please document this. Ed, exception is documents. -- 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] From listmail1 at dsl.pipex.com Tue Dec 20 18:27:32 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 12:28:17 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: Hi Ruslan, Right. This is going to cause me a major problem. I really, really wish this was stated somewhere, as my past two weeks of work have been wasted if I can't include VComponents in a package :-( > Macho app compiled by REALbasic do not work with current V4RB, > because it is CARBON, ...yes they do! As long as it can find the Vcomponents, a Mach-O application will work fine. My app works fine on a machine with the Vcomponents in CFMSupport. Are you *sure* that there is no way to call in to the runtime libraries from a Mach-O compile? I am positive it is possible and easy to do. For example, when I run my Mach-O application on a development computer here, it works absolutely fine with V4RB 2.0.5, as long as the Vcomponents folder is in the CFMSupport folder. Why should Mach-O be able to call Valentina from CFMSupport, but not able to call it from within its own package? It would still be using the same files. It is simply a case of asking it to look in the right place to find them. > What AppBundler cannot do for you ?? AppBundler will not bundle a REALbasic mach-o file, as it is already bundled. > V4RB do not and cannot search in executable_path, because it is CARBON. Drat. Any idea when this might be possible in V4RB for Mach-O? Sorry to ask, but I'll have to revert back to Valentina 1 if it's going to be a while. Which would be very annoying :-( Guess I should have checked this first before upgrading to Valentina v2. But because v1.9 worked fine for Mach-O builds, I kind of assumed that v2 would too. Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Tue, 20 Dec 2005 19:59:38 +0200 > To: "valentina@lists.macserve.net" > Conversation: Vcomponents in Mach-O Package > Subject: Re: Vcomponents in Mach-O Package > > On 12/20/05 6:51 PM, "Dave Addey" wrote: > > Hi Dave, > >> Hi Ruslan, >> >> No, I'd already read that thread and tried everything it suggests. The >> problem is that when you compile as a Mach-O application in REALbasic, the >> application is *already* a bundled .app folder, with the structure in place. >> So, AppBundler can't do anything with it. > > Macho app compiled by REALbasic do not work with current V4RB, > because it is CARBON, > > Future we will make V4RB to be MACHO. > > For now only PEF way > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Tue Dec 20 20:35:07 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 12:36:13 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/20/05 8:27 PM, "Dave Addey" wrote: Hi Dave, > Right. This is going to cause me a major problem. I really, really wish > this was stated somewhere, as my past two weeks of work have been wasted if > I can't include VComponents in a package :-( You cannot build app as PEF ? >> Macho app compiled by REALbasic do not work with current V4RB, >> because it is CARBON, > > ...yes they do! As long as it can find the Vcomponents, a Mach-O > application will work fine. My app works fine on a machine with the > Vcomponents in CFMSupport. Yes we all know this fact. > Are you *sure* that there is no way to call in to the runtime libraries from > a Mach-O compile? I have spend a whole day -- no way. Macho app DO NOT search for libs in the MacOS folder, not in MacOSClasses, not in any other location inside of package. > I am positive it is possible and easy to do. I have not find ANY way, and any info how todo this. Info about MACHO dylibs do not help for CARBON libs. > For example, when I run my Mach-O application on a development computer here, > it works absolutely fine with V4RB 2.0.5, as long as the Vcomponents folder is > in the CFMSupport folder. Right. > Why should Mach-O be able to call Valentina from > CFMSupport, but not able to call it from within its own package? Ask Apple about this. I have send this question to 3 apple list. Silent in response. > It would still be using the same files. It is simply a case of asking it to > look in the right place to find them. Right, just it NOT WANT find them. >> What AppBundler cannot do for you ?? > > AppBundler will not bundle a REALbasic mach-o file, as it is already > bundled. Not clear. It can make you bundle which works perfectly. >> V4RB do not and cannot search in executable_path, because it is CARBON. > > Drat. Any idea when this might be possible in V4RB for Mach-O? Sorry to > ask, but I'll have to revert back to Valentina 1 if it's going to be a > while. Which would be very annoying :-( > Guess I should have checked this first before upgrading to Valentina v2. > But because v1.9 worked fine for Mach-O builds, I kind of assumed that v2 > would too. Well, this is not hard. We have macho engine and products already. Just I do not see any strong reason why you cannot go by PEF way. -- 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] From listmail1 at dsl.pipex.com Tue Dec 20 18:52:11 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 12:52:56 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: Hi Ruslan, > You cannot build app as PEF ? Unfortunately not. My application declares against the new QuickTime 7 MovieAudioExtraction API (amongst other things), which is not available to Carbon. So, I had to switch to a Mach-O build about a year ago. >> ...yes they do! As long as it can find the Vcomponents, a Mach-O >> application will work fine. My app works fine on a machine with the >> Vcomponents in CFMSupport. > > Yes we all know this fact. Sorry :-( >> Are you *sure* that there is no way to call in to the runtime libraries from >> a Mach-O compile? > > I have spend a whole day -- no way. > > Macho app DO NOT search for libs in the MacOS folder, not in MacOSClasses, > not in any other location inside of package. > >> I am positive it is possible and easy to do. > > I have not find ANY way, and any info how todo this. > Info about MACHO dylibs do not help for CARBON libs. I believe you :-) Apologies if I sounded annoyed - I didn't mean it to sounds rude. I'm very grateful for the help you've provided on this issue. It is surprising that it can't be done, but I do believe you. I guess that when I declare against a Carbon dylib in my /Frameworks/ folder, I am declaring from Mach-O to Carbon. V4RB has to go from Carbon to "Carbon in another location", and this is not possible. >> Why should Mach-O be able to call Valentina from >> CFMSupport, but not able to call it from within its own package? > > Ask Apple about this. > > I have send this question to 3 apple list. Silent in response. > >> It would still be using the same files. It is simply a case of asking it to >> look in the right place to find them. > > Right, just it NOT WANT find them. Understood :-) >>> What AppBundler cannot do for you ?? >> >> AppBundler will not bundle a REALbasic mach-o file, as it is already >> bundled. > > Not clear. It can make you bundle which works perfectly. But not from a Mach-O binary - just from a PEF Binary. I understand now why Mach-O is the cause of the problem. > Well, this is not hard. We have macho engine and products already. Excellent! Let me know if you want help beta-testing! > Just I do not see any strong reason why you cannot go by PEF way. See above. It took a long time to move from PEF to Mach-O, but I had to do it. And now there's no going back... Thanks for the support, Dave. From Ed at Kleban.com Tue Dec 20 13:56:51 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 20 13:57:37 2005 Subject: AddRecord non-unique In-Reply-To: Message-ID: On 12/20/05 12:19 PM, "Ruslan Zasukhin" wrote: > On 12/20/05 8:11 PM, "Ed Kleban" wrote: > >> Thanks, Please document this. > > Ed, exception is documents. I'm sorry Ruslan, but if the fact that calling AddRecord will raise an exception if you add record for a non-unique field that is designated as "fUnique" is documented, then I'm unable to find it. I can't find it in Kernel.pdf or V4RB Reference .pdf I can't find it searching for: AddRecord unique funique exception If there is some other way I should be looking for it, please let me know. Also, please note: I have not stated, but will do so now, that when I say "Please document X" I mean something very specific when we're talking about a method. I mean: Please document X in the page dedicated to a description of the method in the V4RB reference manual. I don't mean document it in a separate section about exceptions. I don't mean document it in a separate section about fUnique and other flags. Those would both be nice too as extra clues of course and would add to the clarity and comprehensivness of the documentation. But I specifically mean document it where it BELONGS, so that the user can simply turn to the definition of AddRecord and read the full contract, with all the gory details, all the side-effects, all the special cases, care, and handling require to use that call. Failing in finding it there of course, I usually always spend the extra effort to look everywhere else. Occassionally that pays off. Occasionally It is documented somewhere else and I miss it. Maybe I missed it this time too. Just let me know where please if you find it. Thanks! --Ed From sunshine at public.kherson.ua Tue Dec 20 22:54:44 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 14:55:30 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/20/05 8:52 PM, "Dave Addey" wrote: > > Excellent! Let me know if you want help beta-testing! > >> Just I do not see any strong reason why you cannot go by PEF way. > > See above. It took a long time to move from PEF to Mach-O, but I had to do > it. And now there's no going back... Okay, I see, you are linked to MACHO build. What is your timeline ? -- 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] From listmail1 at dsl.pipex.com Tue Dec 20 21:03:33 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 15:04:19 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: Hi Ruslan, Thanks for the response. Yes, sadly I am tied to Mach-O. Regarding timelines, I was hoping to release a new beta version in two weeks, and a final public version in a month or two, depending on testing. What are the timelines for Mach-O V4RB? I am pretty much tied to using Valentina 2 now (I really need the Unicode sorting), so I am very happy to beta test as much as possible :-) BTW, I was looking around to find out how CFM and Mach-O work together, and I discovered this link. Could it be useful for calling CFM code from somewhere other than the CFMSupport folder? http://developer.apple.com/samplecode/CallMachOFramework/listing4.html Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Tue, 20 Dec 2005 22:54:44 +0200 > To: "valentina@lists.macserve.net" > Conversation: Vcomponents in Mach-O Package > Subject: Re: Vcomponents in Mach-O Package > > On 12/20/05 8:52 PM, "Dave Addey" wrote: > >> >> Excellent! Let me know if you want help beta-testing! >> >>> Just I do not see any strong reason why you cannot go by PEF way. >> >> See above. It took a long time to move from PEF to Mach-O, but I had to do >> it. And now there's no going back... > > Okay, I see, you are linked to MACHO build. > > What is your timeline ? > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From jda at his.com Tue Dec 20 16:07:47 2005 From: jda at his.com (jda) Date: Tue Dec 20 15:08:38 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: References: Message-ID: > >> Just I do not see any strong reason why you cannot go by PEF way. >> >> See above. It took a long time to move from PEF to Mach-O, but I had to do >> it. And now there's no going back... > >Okay, I see, you are linked to MACHO build. > >What is your timeline ? > Hi Ruslan, Some things in RB require MACH-O builds. For example, HTMLViewer (which I plan to start using at some point in the future, too). So it's not just a matter of preference in some cases. Jon From sunshine at public.kherson.ua Tue Dec 20 23:18:58 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 15:19:49 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/20/05 11:07 PM, "jda" wrote: >>>> Just I do not see any strong reason why you cannot go by PEF way. >>> >>> See above. It took a long time to move from PEF to Mach-O, but I had to do >>> it. And now there's no going back... >> >> Okay, I see, you are linked to MACHO build. >> >> What is your timeline ? >> > > Hi Ruslan, > > Some things in RB require MACH-O builds. For example, HTMLViewer > (which I plan to start using at some point in the future, too). So > it's not just a matter of preference in some cases. I think it will talk half of day for me to produce MACHO build, This should go as separate archive, MACHO + WIN. I think bad idea put together CARBON and MACHO, because they require 2 different VComponents folders. ----- Also MACHO bring another problem guys. V4RB_Macho installer will install VComponents_cw_macho into /usr/local/lib Then you can start easy develop. When you need move VComponents into final build of your app, it will require fix @executable_path. Well, it is not hard, we have script for this.. -- 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] From listmail1 at dsl.pipex.com Tue Dec 20 22:07:32 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Tue Dec 20 16:08:16 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: Hi Ruslan, > I think it will talk half of day for me to produce MACHO build, Great! > This should go as separate archive, MACHO + WIN. > > I think bad idea put together CARBON and MACHO, because they require 2 > different VComponents folders. The separate archive would be fine for me. I use MACHO only. > Also MACHO bring another problem guys. > > V4RB_Macho installer will install VComponents_cw_macho into /usr/local/lib > > Then you can start easy develop. When you need move VComponents into final > build of your app, it will require fix @executable_path. > > Well, it is not hard, we have script for this.. It would be very nice if the MACHO version of the components could be a true Framework. This seems to be the recommended way to bundle together all of the elements of something like VComponents. The VComponents.framework could then live in the application bundle, for example: /Contents/Frameworks/VComponents.framework (http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tas ks/CreatingFrameworks.html#//apple_ref/doc/uid/20002258-106880) A development computer could also have the framework installed in /Library/Frameworks/ to make it available to all applications. (http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tas ks/InstallingFrameworks.html#//apple_ref/doc/uid/20002261-97184-TPXREF101) If the MACHO build *isn't* a true Framework, the Vcomponent files should still go in /Contents/Frameworks/ when they are included in the application bundle. I'd suggest that the @executable_path linker fix should *always* look in this location first. Good luck with the build - I look forward to giving it a try! All the best, Dave. From sunshine at public.kherson.ua Wed Dec 21 00:53:26 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Tue Dec 20 16:54:25 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: On 12/21/05 12:07 AM, "Dave Addey" wrote: Hi Dave, >> Well, it is not hard, we have script for this.. > > It would be very nice if the MACHO version of the components could be a true > Framework. This seems to be the recommended way to bundle together all of > the elements of something like VComponents. The VComponents.framework could > then live in the application bundle, for example: > > /Contents/Frameworks/VComponents.framework No it is as: /Contents/VComponents > A development computer could also have the framework installed in > /Library/Frameworks/ to make it available to all applications. Instead we go into /usr/local/lib > If the MACHO build *isn't* a true Framework, the Vcomponent files should > still go in /Contents/Frameworks/ when they are included in the application > bundle. I'd suggest that the @executable_path linker fix should *always* > look in this location first. /Contents/VComponents -- 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] From Ed at Kleban.com Tue Dec 20 21:08:14 2005 From: Ed at Kleban.com (Ed Kleban) Date: Tue Dec 20 21:09:01 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/20/05 2:35 AM, "Ruslan Zasukhin" wrote: > On 12/20/05 7:18 AM, "Ed Kleban" wrote: > >> >> If FindValue or FindValueAsArraySet fails to find any matching values will >> then: >> >> Always return a non-nil VSet with VSet.count = 0? >> >> Always return nil? > > yes > >> May return either of the above so you always have to test for both? > > No. only nil. To avoid creation of object. Well, the code check I put in to validate this just produced a counter example proving that this is not in fact the case. So... what should I conclude? Is this a bug in Valentina? ==== The code may be found below. The debugger shows that at the point in time when the following line raises an alert: return EmptyVArraySetCheck( here, result ) that: aVBitSet.count = 35 itemRids.count = 35 result is non-nil VArraySet result.count = 0 result.empty = True ======== Function FindAllItemRidsForFormRid(aFormRid as Integer, itemRids as VArraySet) As VArraySet // FindAllItemRidsForFormRid // Return a VArraySet with the rids of all the Item records listed in // itemRids having an fItmFormRid field value equal to aFormRid. // This method is a special case of super.FindValueFromArraySet which // is a temporary patch method until Valentina fixes the bug that // prevents FindValueAsArraySet from working properly with a // VArraySet inSelection argument. const here = "FindAllItemRidsForFormRid" dim aVBitSet as VBitSet aVBitSet = new VBitSet( self.RecordCount, itemRids ) #if DebugBuild then if aVBitSet.count <> itemRids.count then fail( here, "Count mismatch" ) end #endif #if DebugBuild then dim result as VArraySet result = fItmFormRid.FindValueAsArraySet( aFormRid, aVBitSet ) return EmptyVArraySetCheck( here, result ) #else return fItmFormRid.FindValueAsArraySet( aFormRid, aVBitSet ) #endif // @Fix Remove call to VBitSet from this patch when Valentina gets fixed. End Function ======== Function EmptyVArraySetCheck(where as String, resultVArraySet as VArraySet) As VArraySet // EmptyVArraySetCheck // Generate an alert declared at if resultVArraySet is a non-nil // VSet with a count of 0. // Return nil if resultVArraySet has a count of 0 otherwise // return resultVSet if resultVArraySet <> nil and resultVArraySet.count = 0 then alert( where, "Return non-nil ArraySet with count = 0" ) return nil else return resultVArraySet end End Function From sunshine at public.kherson.ua Wed Dec 21 09:20:51 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 01:21:36 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/21/05 5:08 AM, "Ed Kleban" wrote: >>> May return either of the above so you always have to test for both? >> >> No. only nil. To avoid creation of object. > > > Well, the code check I put in to validate this just produced a counter > example proving that this is not in fact the case. > > So... what should I conclude? Is this a bug in Valentina? > > ==== > > The code may be found below. > > The debugger shows that at the point in time when the following line > raises an alert: > > return EmptyVArraySetCheck( here, result ) > > that: > aVBitSet.count = 35 > itemRids.count = 35 > result is non-nil VArraySet > result.count = 0 > result.empty = True Ed, A lots of code :-( Let's try again in short form: You say that some FUNCTION() return you not nil as expected but Set object. Right? What name of this function? So do you search which must find ZERO records, right ? -- 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] From sunshine at public.kherson.ua Wed Dec 21 09:27:56 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 01:28:42 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/21/05 5:08 AM, "Ed Kleban" wrote: > Well, the code check I put in to validate this just produced a counter > example proving that this is not in fact the case. > > So... what should I conclude? Is this a bug in Valentina? Ed, Another advice. V4RB have a lots of examples. We have examples for sets also. So you can take example, and correct 1-2 lines to get search similar to you. Then you can EASY and CLEAR show us how to reproduce problem. MAY BE you will find that you cannot reproduce in example, so this means bug can be in your code. -- 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] From Ed at Kleban.com Wed Dec 21 01:30:12 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 21 01:31:00 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/21/05 1:20 AM, "Ruslan Zasukhin" wrote: > On 12/21/05 5:08 AM, "Ed Kleban" wrote: > >>>> May return either of the above so you always have to test for both? >>> >>> No. only nil. To avoid creation of object. >> >> >> Well, the code check I put in to validate this just produced a counter >> example proving that this is not in fact the case. >> >> So... what should I conclude? Is this a bug in Valentina? >> >> ==== >> >> The code may be found below. >> >> The debugger shows that at the point in time when the following line >> raises an alert: >> >> return EmptyVArraySetCheck( here, result ) >> >> that: >> aVBitSet.count = 35 >> itemRids.count = 35 >> result is non-nil VArraySet >> result.count = 0 >> result.empty = True > > Ed, > > A lots of code :-( Sorry. Most of it is comments actually ;-) > Let's try again in short form: > > You say that some FUNCTION() return you not nil as expected but Set object. > Right? Correct. > What name of this function? result = fItmFormRid.FindValueAsArraySet( aFormRid, aVBitSet ) > So do you search which must find ZERO records, right ? > I do thousands of searches. Many of them may return zero records, correct. My main code assumes that searches will always return nil if no records are found instead of a VArraySet with count = 0; just as you said should be the case. But when DebugBuild = true I trust nothing. I don't trust RB to work right, I don't trust Valentina to work right, and I don't trust me to code right. So I check EVERYTHING. And my checks discovered that FindValueAsArraySet can return a VArraySet that is not nil and has count = 0. From sunshine at public.kherson.ua Wed Dec 21 09:41:29 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 01:42:16 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/21/05 9:30 AM, "Ed Kleban" wrote: > result = fItmFormRid.FindValueAsArraySet( aFormRid, aVBitSet ) > >> So do you search which must find ZERO records, right ? >> > > I do thousands of searches. Many of them may return zero records, correct. > My main code assumes that searches will always return nil if no records are > found instead of a VArraySet with count = 0; just as you said should be the > case. > > But when DebugBuild = true I trust nothing. I don't trust RB to work right, > I don't trust Valentina to work right, and I don't trust me to code right. > So I check EVERYTHING. And my checks discovered that FindValueAsArraySet > can return a VArraySet that is not nil and has count = 0. Okay, I think I see when. You pass aVBitSet which was an object ... Ok, we will check this combination again. -- 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] From Ed at Kleban.com Wed Dec 21 01:44:21 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 21 01:45:09 2005 Subject: FindValue return values In-Reply-To: Message-ID: On 12/21/05 1:27 AM, "Ruslan Zasukhin" wrote: > On 12/21/05 5:08 AM, "Ed Kleban" wrote: > >> Well, the code check I put in to validate this just produced a counter >> example proving that this is not in fact the case. >> >> So... what should I conclude? Is this a bug in Valentina? > > Ed, > > Another advice. V4RB have a lots of examples. > We have examples for sets also. > > So you can take example, and correct 1-2 lines to get search similar to you. > > Then you can EASY and CLEAR show us how to reproduce problem. > > MAY BE you will find that you cannot reproduce in example, so this means bug > can be in your code. > That is very good advice. Before I submit a bug to Mantis that is typically exactly what I would do: Either make a small simple program that replicates the error, or if necessary for a horrible bug slice away everything from my program until nothing but the bug is left. But I'm not at that point yet. And my best guess right now is that there are hundreds of calls where nil is returned properly and I just happen to have one specific case I discovered in which nil is not returned but a VArraySet with count=0 is returned. Eventually I'll take the time to investigate more. For right now I'm offering a "first alert". I may end up being incorrect. In the meantime I have turned off breakpoints when this occurs but continue to log them in my error log. I'll have to revisit all of this code again soon anyway in January if and when you start tinkering with FindValueAsArraySet to take a VArraySet argument (and hopefully use it as an ordered set). I'll let you know more when I do. Thanks --Ed. From listmail1 at dsl.pipex.com Wed Dec 21 15:56:13 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Wed Dec 21 09:57:00 2005 Subject: Vcomponents in Mach-O Package In-Reply-To: Message-ID: Hi Ruslan, >> It would be very nice if the MACHO version of the components could be a true >> Framework. This seems to be the recommended way to bundle together all of >> the elements of something like VComponents. The VComponents.framework could >> then live in the application bundle, for example: >> >> /Contents/Frameworks/VComponents.framework > > No it is as: > > /Contents/VComponents To be honest, as long as it works, I'm happy. Although Apple say: "While executable and resource files are standard in most bundles, there are several other special directories that are not needed by most bundles. These directories include the following: "A Frameworks directory contains any private libraries and frameworks used by the executable" (http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundle s/Concepts/BundleAnatomy.html#//apple_ref/doc/uid/20001119-110730-TPXREF5) So even if it's just a folder of Vcomponents, and not a "Framework" in the literal Apple sense, it should really go in /Contents/Frameworks/Vcomponents. But as I say, if it works, I'm happy :-) >> A development computer could also have the framework installed in >> /Library/Frameworks/ to make it available to all applications. > > Instead we go into /usr/local/lib Fine by me! Dave. From amacdr at mac.com Wed Dec 21 14:20:26 2005 From: amacdr at mac.com (Michael Krugman) Date: Wed Dec 21 14:21:17 2005 Subject: Problem installing Valentina Server Message-ID: <0AB756F8-401F-4FA4-A37E-A167222B0037@mac.com> Hi List: I have a problem that I can't seem to find any solution for, so I thought I would try here. I have been a longtime user of Valentina DB. We built an installer that installs XYZServer into /Library, and XYZServer into /Library/Startupitems. Since 10.4, each install we do gives us a permission error in /Library/Startupitems. The error is generated by OS X. It gives the option to FIX the permission problem. The user clicks FIX, then another dialog informs the user the fix has been completed and they must restart the computer. When the user clicks restart, the system hangs. All of the icons disappear and the background is visible. The system will sit this way until manually turning it off, then restarting. Has anyone else experienced this? If so, can you help me with a solution? This behavior happens every single time and can be easily recreated. Thanks in advance... Mike Krugman From sunshine at public.kherson.ua Wed Dec 21 22:32:24 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 14:33:10 2005 Subject: Problem installing Valentina Server In-Reply-To: <0AB756F8-401F-4FA4-A37E-A167222B0037@mac.com> Message-ID: On 12/21/05 10:20 PM, "Michael Krugman" wrote: > Hi List: > > I have a problem that I can't seem to find any solution for, so I > thought I would try here. I have been a longtime user of Valentina > DB. We built an installer that installs XYZServer into /Library, and > XYZServer into /Library/Startupitems. Since 10.4, each install we do > gives us a permission error in /Library/Startupitems. The error is > generated by OS X. It gives the option to FIX the permission > problem. The user clicks FIX, then another dialog informs the user > the fix has been completed and they must restart the computer. When > the user clicks restart, the system hangs. All of the icons disappear > and the background is visible. The system will sit this way until > manually turning it off, then restarting. Has anyone else > experienced this? If so, can you help me with a solution? This > behavior happens every single time and can be easily recreated. > Thanks in advance... Yes Michael, I also did fight with this problem on 10.4 few month ago. Problem is that when you prepare files to be packaged, You need setup correct permissions for folders/files which go to /Library folders. You can install our Valentina Server and see what this permissions are. In fact all files in the /Library/Startupitems have that permissions. So check them and set for your own files also the same -- 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] From sunshine at public.kherson.ua Wed Dec 21 22:33:47 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 14:34:33 2005 Subject: Problem installing Valentina Server In-Reply-To: <0AB756F8-401F-4FA4-A37E-A167222B0037@mac.com> Message-ID: On 12/21/05 10:20 PM, "Michael Krugman" wrote: > Hi List: > > I have a problem that I can't seem to find any solution for, so I > thought I would try here. I have been a longtime user of Valentina > DB. We built an installer that installs XYZServer into /Library, and > XYZServer into /Library/Startupitems. Since 10.4, each install we do > gives us a permission error in /Library/Startupitems. The error is > generated by OS X. It gives the option to FIX the permission > problem. The user clicks FIX, then another dialog informs the user > the fix has been completed and they must restart the computer. When > the user clicks restart, the system hangs. All of the icons disappear > and the background is visible. The system will sit this way until > manually turning it off, then restarting. Has anyone else > experienced this? If so, can you help me with a solution? This > behavior happens every single time and can be easily recreated. > Thanks in advance... Michael, Also note that in our latest Vserver was changed scripts that go into Startupitems. This was also important for 10.4 -- 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] From amacdr at mac.com Wed Dec 21 15:14:27 2005 From: amacdr at mac.com (Michael Krugman) Date: Wed Dec 21 15:15:14 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: <84FC7DD3-FF1F-4DEC-991A-2FB0227FAF2E@mac.com> Rusian: That has to be it...I've been through everything else under the sun. I have version 2.0a67. The plugin is V4RB_Client.rbx I downloaded the latest, but I don't see the same plugin. When I attempt to use this plugin, then recompile, all I get are errors. What do I need to do to solve this? Mike On Dec 21, 2005, at 2:33 PM, Ruslan Zasukhin wrote: > On 12/21/05 10:20 PM, "Michael Krugman" wrote: > >> Hi List: >> >> I have a problem that I can't seem to find any solution for, so I >> thought I would try here. I have been a longtime user of Valentina >> DB. We built an installer that installs XYZServer into /Library, and >> XYZServer into /Library/Startupitems. Since 10.4, each install we do >> gives us a permission error in /Library/Startupitems. The error is >> generated by OS X. It gives the option to FIX the permission >> problem. The user clicks FIX, then another dialog informs the user >> the fix has been completed and they must restart the computer. When >> the user clicks restart, the system hangs. All of the icons disappear >> and the background is visible. The system will sit this way until >> manually turning it off, then restarting. Has anyone else >> experienced this? If so, can you help me with a solution? This >> behavior happens every single time and can be easily recreated. >> Thanks in advance... > > Michael, > > Also note that in our latest Vserver was changed scripts that go into > Startupitems. > > This was also important for 10.4 > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From sunshine at public.kherson.ua Wed Dec 21 23:47:17 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 15:48:03 2005 Subject: Problem installing Valentina Server In-Reply-To: <84FC7DD3-FF1F-4DEC-991A-2FB0227FAF2E@mac.com> Message-ID: On 12/21/05 11:14 PM, "Michael Krugman" wrote: Hi Michael, > Rusian: > > That has to be it...I've been through everything else under the sun. > I have version 2.0a67. The plugin is V4RB_Client.rbx > I downloaded the latest, but I don't see the same plugin. > When I attempt to use this plugin, then recompile, all I get are errors. > What do I need to do to solve this? Moment. You use Vserver 2.0 a67? I.e. Based on engine 1.x ? Then you cannot use 2.x builds. Use the same server and the same plugin. Just download latest 2.0.5 Vserve, install it on some computer, and check scripts. Later uninstall 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] From amacdr at mac.com Wed Dec 21 15:50:25 2005 From: amacdr at mac.com (Michael Krugman) Date: Wed Dec 21 15:51:14 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: Rusian: How much has this changed from 2.0a67? I downloaded the new Valentina Sever. I installed it. After the installation and I restarted, I don't find the same files in the new Server as were in the previous ones. The VServer_2 instructions seem to be the same as previous versions, but the files are not. In VServer_Office, I find: (Installed in /Library) Databases folder, with master.vdb inside licenses folder vServer_Office APPLICATION, not Unix executable like before VServer_Office.ini In /Library/Startupitems: vServer_Office and the files are the same. As you can see, there is no Unix executable AND there is no Server.DYLIB file. Is this correct? Mike On Dec 21, 2005, at 2:32 PM, Ruslan Zasukhin wrote: > On 12/21/05 10:20 PM, "Michael Krugman" wrote: > >> Hi List: >> >> I have a problem that I can't seem to find any solution for, so I >> thought I would try here. I have been a longtime user of Valentina >> DB. We built an installer that installs XYZServer into /Library, and >> XYZServer into /Library/Startupitems. Since 10.4, each install we do >> gives us a permission error in /Library/Startupitems. The error is >> generated by OS X. It gives the option to FIX the permission >> problem. The user clicks FIX, then another dialog informs the user >> the fix has been completed and they must restart the computer. When >> the user clicks restart, the system hangs. All of the icons disappear >> and the background is visible. The system will sit this way until >> manually turning it off, then restarting. Has anyone else >> experienced this? If so, can you help me with a solution? This >> behavior happens every single time and can be easily recreated. >> Thanks in advance... > > Yes Michael, > > I also did fight with this problem on 10.4 few month ago. > > Problem is that when you prepare files to be packaged, > You need setup correct permissions for folders/files which go to > /Library folders. > > You can install our Valentina Server and see what this permissions > are. > > In fact all files in the /Library/Startupitems have that permissions. > So check them and set for your own files also the same > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina Sincerely, Mike Krugman President and Chief Developer ? aMac Digital Radiography http://www.amacdr.com amacdr@mac.com Phone: 866-506-9736 From amacdr at mac.com Wed Dec 21 16:28:07 2005 From: amacdr at mac.com (Michael Krugman) Date: Wed Dec 21 16:28:55 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: <7A56CCA6-175B-4CFB-9D16-BEE53A982A03@mac.com> Rusian: What did you end up doing to solve it? I only get the problem under / Library/Startupitems. I checked and double and triple checked to make sure the permissions in the installed files were exactly the same as what they should be. In fact, if the permissions are exactly the same, I don't get any error at all, but the system still hangs when shutting down right after the install. I have to push the power button in to turn the computer off, then turn it back on again. From that point, everything works perfect. Did you make some kind of installer script? I did install the latest Valentina Server v2.0.5 and the permissions from that install are exactly the same., but I still have the problem. I also noticed (I sent you a separate email about that) the files in v2.0.5 are not the same as the one I'm using 2.0a67. You said earlier that you changed some things for 10.4. What do you suggest I do? Do I need to buy the latest Valentina and recode it? Anything you can do to help me with this is appreciated...one thing for sure is I must get this fixed no matter what it takes. Thank you. Mike Krugman On Dec 21, 2005, at 2:32 PM, Ruslan Zasukhin wrote: > On 12/21/05 10:20 PM, "Michael Krugman" wrote: > >> Hi List: >> >> I have a problem that I can't seem to find any solution for, so I >> thought I would try here. I have been a longtime user of Valentina >> DB. We built an installer that installs XYZServer into /Library, and >> XYZServer into /Library/Startupitems. Since 10.4, each install we do >> gives us a permission error in /Library/Startupitems. The error is >> generated by OS X. It gives the option to FIX the permission >> problem. The user clicks FIX, then another dialog informs the user >> the fix has been completed and they must restart the computer. When >> the user clicks restart, the system hangs. All of the icons disappear >> and the background is visible. The system will sit this way until >> manually turning it off, then restarting. Has anyone else >> experienced this? If so, can you help me with a solution? This >> behavior happens every single time and can be easily recreated. >> Thanks in advance... > > Yes Michael, > > I also did fight with this problem on 10.4 few month ago. > > Problem is that when you prepare files to be packaged, > You need setup correct permissions for folders/files which go to > /Library folders. > > You can install our Valentina Server and see what this permissions > are. > > In fact all files in the /Library/Startupitems have that permissions. > So check them and set for your own files also the same > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina Sincerely, Mike Krugman President and Chief Developer ? aMac Digital Radiography http://www.amacdr.com amacdr@mac.com Phone: 866-506-9736 From sunshine at public.kherson.ua Thu Dec 22 02:52:04 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 21 18:52:51 2005 Subject: Problem installing Valentina Server In-Reply-To: <7A56CCA6-175B-4CFB-9D16-BEE53A982A03@mac.com> Message-ID: On 12/22/05 12:28 AM, "Michael Krugman" wrote: > You said earlier that you changed some things for 10.4. What do you > suggest I do? Do I need to buy the latest Valentina and recode it? > Anything you can do to help me with this is appreciated...one thing > for sure is I must get this fixed no matter what it takes. Thank you. If you have buy Vsever based on 1.x engine, then your license should work with Vserver 2.x also. I.e. No need to buy new. But switch to 2.x version require some efforts I think. Sorry it is too late here, I will answer rest at morning -- 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] From sunshine at public.kherson.ua Thu Dec 22 09:43:37 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 22 01:44:26 2005 Subject: Problem installing Valentina Server In-Reply-To: Message-ID: On 12/21/05 11:50 PM, "Michael Krugman" wrote: > Rusian: > > How much has this changed from 2.0a67? I downloaded the new > Valentina Sever. I installed it. After the installation and I > restarted, I don't find the same files in the new Server as were in > the previous ones. The VServer_2 instructions seem to be the same as > previous versions, but the files are not. Now VServer is made as package, so to see internal files do Show package Script changed to reflect this: ------------------------------ #!/bin/sh ## # Start Valentina Server ## . /etc/rc.common StartService () { ConsoleMessage "Starting Valentina Server" /Library/VServer_Office/VServer_Office.app/Contents/MacOS/VServer_Office } StopService () { ConsoleMessage "Stopping Valentina Server" } RestartService () { ConsoleMessage "Restarting Valentina Server" } RunService "$1" -------------------------------- When I have told you check script, I mean note, that Tiger require write it in above form when you specify 3 functions: StartService (), ... > In VServer_Office, I find: (Installed in /Library) > > Databases folder, with master.vdb inside > licenses folder > vServer_Office APPLICATION, not Unix executable like before > VServer_Office.ini right > In /Library/Startupitems: > > vServer_Office and the files are the same. Right. But script itself was changed. > As you can see, there is no Unix executable AND there is no > Server.DYLIB file. > > Is this correct? No, they are inside of package. But this is just cosmetic! If you will use VServer 1.x, then this is not important for you. Important is to write correct script. Btw, this script works for 10.3 also. -- 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] From sunshine at public.kherson.ua Thu Dec 22 09:46:15 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 22 01:47:01 2005 Subject: Problem installing Valentina Server In-Reply-To: <7A56CCA6-175B-4CFB-9D16-BEE53A982A03@mac.com> Message-ID: On 12/22/05 12:28 AM, "Michael Krugman" wrote: Hi Michael, > Rusian: > > What did you end up doing to solve it? I only get the problem under / > Library/Startupitems. I checked and double and triple checked to > make sure the permissions in the installed files were exactly the > same as what they should be. In fact, if the permissions are exactly > the same, I don't get any error at all, but the system still hangs > when shutting down right after the install. Aha, so as I understand problem with dialog "fix permissions" after RESTART after server install have go away, right ? And you have now problem with system hang. Problem is that you need script as: YOU MUST HAVE handlers StartService(), ... ---------------------------------------------------- #!/bin/sh ## # Start Valentina Server ## . /etc/rc.common StartService () { ConsoleMessage "Starting Valentina Server" /Library/VServer_Office/VServer_Office.app/Contents/MacOS/VServer_Office } StopService () { ConsoleMessage "Stopping Valentina Server" } RestartService () { ConsoleMessage "Restarting Valentina Server" } RunService "$1" -- 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] From listmail1 at dsl.pipex.com Thu Dec 22 10:49:43 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Thu Dec 22 04:50:34 2005 Subject: Unicode locales datafile Message-ID: Hi all, A question about ValentinaKernel_2_en.pdf, page 18: > Also part of ICU is file icudt30l.dat. It is on default is quite big (about 8 > MB). This file con- > tains information about all Locales of the world. It is possible to reduce > this file to 3.5 MB > if to remove not needed Locales. How do I reduce this file size by removing locales? Dave. From sunshine at public.kherson.ua Thu Dec 22 14:10:49 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 22 06:11:36 2005 Subject: Unicode locales datafile In-Reply-To: Message-ID: On 12/22/05 12:49 PM, "Dave Addey" wrote: >> Also part of ICU is file icudt30l.dat. It is on default is quite big (about 8 >> MB). This file con- >> tains information about all Locales of the world. It is possible to reduce >> this file to 3.5 MB >> if to remove not needed Locales. > > How do I reduce this file size by removing locales? > > Dave. For this you should go to IBM ICU library page. Download it, build it via Make. This give some set of command line utils which can do this work. -- 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] From listmail1 at dsl.pipex.com Thu Dec 22 13:54:24 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Thu Dec 22 07:55:14 2005 Subject: Unicode locales datafile In-Reply-To: Message-ID: Hi Ruslan, Thanks! I'll give it a try. Dave. > From: Ruslan Zasukhin > Reply-To: Valentina Developers > Date: Thu, 22 Dec 2005 14:10:49 +0200 > To: "valentina@lists.macserve.net" > Conversation: Unicode locales datafile > Subject: Re: Unicode locales datafile > > On 12/22/05 12:49 PM, "Dave Addey" wrote: > >>> Also part of ICU is file icudt30l.dat. It is on default is quite big (about >>> 8 >>> MB). This file con- >>> tains information about all Locales of the world. It is possible to reduce >>> this file to 3.5 MB >>> if to remove not needed Locales. >> >> How do I reduce this file size by removing locales? >> >> Dave. > > For this you should go to IBM ICU library page. > > Download it, build it via Make. > This give some set of command line utils which can do this work. > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From amacdr at mac.com Thu Dec 22 08:07:20 2005 From: amacdr at mac.com (Michael Krugman) Date: Thu Dec 22 08:08:10 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: <3E826090-C53C-43C2-894E-831B03FAA93C@mac.com> Rusian: Is this a startup scrip that I have to create or one that is already created but needs to be edited? With my current version, I didn't do anything with scripts... Mike On Dec 22, 2005, at 1:46 AM, Ruslan Zasukhin wrote: > On 12/22/05 12:28 AM, "Michael Krugman" wrote: > > Hi Michael, > >> Rusian: >> >> What did you end up doing to solve it? I only get the problem >> under / >> Library/Startupitems. I checked and double and triple checked to >> make sure the permissions in the installed files were exactly the >> same as what they should be. In fact, if the permissions are exactly >> the same, I don't get any error at all, but the system still hangs >> when shutting down right after the install. > > Aha, so as I understand problem with dialog "fix permissions" after > RESTART > after server install have go away, right ? > > And you have now problem with system hang. > > Problem is that you need script as: > > YOU MUST HAVE handlers StartService(), ... > > > ---------------------------------------------------- > #!/bin/sh > > ## > # Start Valentina Server > ## > > . /etc/rc.common > > > StartService () > { > ConsoleMessage "Starting Valentina Server" > /Library/VServer_Office/VServer_Office.app/Contents/MacOS/ > VServer_Office > } > > > StopService () > { > ConsoleMessage "Stopping Valentina Server" > } > > > RestartService () > { > ConsoleMessage "Restarting Valentina Server" > } > > RunService "$1" > > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina Sincerely, Mike Krugman President and Chief Developer ? aMac Digital Radiography http://www.amacdr.com amacdr@mac.com Phone: 866-506-9736 From sunshine at public.kherson.ua Thu Dec 22 16:20:01 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 22 08:20:49 2005 Subject: Problem installing Valentina Server In-Reply-To: <3E826090-C53C-43C2-894E-831B03FAA93C@mac.com> Message-ID: On 12/22/05 4:07 PM, "Michael Krugman" wrote: > Rusian: > > Is this a startup scrip that I have to create or one that is already > created but needs to be edited? With my current version, I didn't > do anything with scripts... Yes, just use script as I have paste, and in my script set path to Vserver as in your current -- 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] From amacdr at mac.com Thu Dec 22 08:23:00 2005 From: amacdr at mac.com (Michael Krugman) Date: Thu Dec 22 08:23:48 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: <2A669A6D-AE9C-4C44-AA8E-1D9A28038E19@mac.com> OK...I understand that. What I don't know is where your script is...I have never seen it. Mike On Dec 22, 2005, at 8:20 AM, Ruslan Zasukhin wrote: > On 12/22/05 4:07 PM, "Michael Krugman" wrote: > >> Rusian: >> >> Is this a startup scrip that I have to create or one that is already >> created but needs to be edited? With my current version, I didn't >> do anything with scripts... > > Yes, just use script as I have paste, and in my script set path to > Vserver > as in your current > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From amacdr at mac.com Thu Dec 22 08:25:39 2005 From: amacdr at mac.com (Michael Krugman) Date: Thu Dec 22 08:26:27 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: <7CA3FE80-480D-49F5-BC66-5567579F1044@mac.com> Rusian: I found it...I think...thank you. Mike On Dec 22, 2005, at 8:20 AM, Ruslan Zasukhin wrote: > On 12/22/05 4:07 PM, "Michael Krugman" wrote: > >> Rusian: >> >> Is this a startup scrip that I have to create or one that is already >> created but needs to be edited? With my current version, I didn't >> do anything with scripts... > > Yes, just use script as I have paste, and in my script set path to > Vserver > as in your current > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From amacdr at mac.com Thu Dec 22 08:52:08 2005 From: amacdr at mac.com (Michael Krugman) Date: Thu Dec 22 08:52:57 2005 Subject: Problem installing Valentina Server In-Reply-To: References: Message-ID: <1B1C1689-F684-49F1-BDE3-2FA86FB352BA@mac.com> Rusian: It's working. No more installer problems. Thank you very much for the help. Mike On Dec 22, 2005, at 8:20 AM, Ruslan Zasukhin wrote: > On 12/22/05 4:07 PM, "Michael Krugman" wrote: > >> Rusian: >> >> Is this a startup scrip that I have to create or one that is already >> created but needs to be edited? With my current version, I didn't >> do anything with scripts... > > Yes, just use script as I have paste, and in my script set path to > Vserver > as in your current > > -- > 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] > > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From listmail1 at dsl.pipex.com Thu Dec 22 16:06:26 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Thu Dec 22 10:07:16 2005 Subject: Switching to RB2005, getting "professional only" error message Message-ID: Hi, I?m switching to using RB 2005 rather than RB 5.5.5 (as a test), and when I compile my application, I get an error: The plugin:V4RB:128 class is an exclusive feature of REALbasic Professional Edition. (I am running Standard edition, Mac-only.) I am using Valentina in a Classes way, rather than a REALdatabase way. I thought this would enable me to run in REALbasic Standard (it does under RB 5.5.5.) Is there anything I could be doing to trigger the ?professional? requirement? RB 2005.4, V4RB 2.0.5, Mac OS 10.4.3, Mach-o compile Dave. From listmail1 at dsl.pipex.com Thu Dec 22 16:08:47 2005 From: listmail1 at dsl.pipex.com (Dave Addey) Date: Thu Dec 22 10:09:35 2005 Subject: Switching to RB2005, getting "professional only" error message In-Reply-To: Message-ID: Sorry, it's there for all to see in the documentation: If you use REALbasic Standard then you need disable RBDB features of V4RB, because RB Standard do not allow use them. To do this you need just create any file with name DisableRBDB inside of plugins folder of REALbasic. In this case items in the menu "Add Data Sources" will not present and you can use only classes of V4RB. I should have read that first. Sorry. Dave. > From: Dave Addey > Reply-To: Valentina Developers > Date: Thu, 22 Dec 2005 16:06:26 +0000 > To: Valentina Developers > Conversation: Switching to RB2005, getting "professional only" error message > Subject: Switching to RB2005, getting "professional only" error message > > Hi, > > I?m switching to using RB 2005 rather than RB 5.5.5 (as a test), and when I > compile my application, I get an error: > > The plugin:V4RB:128 class is an exclusive feature of REALbasic Professional > Edition. > > (I am running Standard edition, Mac-only.) > > I am using Valentina in a Classes way, rather than a REALdatabase way. I > thought this would enable me to run in REALbasic Standard (it does under RB > 5.5.5.) Is there anything I could be doing to trigger the ?professional? > requirement? > > RB 2005.4, V4RB 2.0.5, Mac OS 10.4.3, Mach-o compile > > Dave. > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From cbpelto at pcisys.net Thu Dec 22 13:07:41 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 22 14:08:30 2005 Subject: A Generic Variable Message-ID: <08707DF7-2B2B-4EAD-A4E9-DCCC4CF9B8F4@pcisys.net> Is there any type of generic variable that I can use to hold either numerical or character/string values from V4RB2? Chuck From sunshine at public.kherson.ua Thu Dec 22 22:55:58 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 22 14:56:47 2005 Subject: A Generic Variable In-Reply-To: <08707DF7-2B2B-4EAD-A4E9-DCCC4CF9B8F4@pcisys.net> Message-ID: On 12/22/05 10:07 PM, "Chuck Pelto" wrote: Hi Chuck, > Is there any type of generic variable that I can use to hold either > numerical or character/string values from V4RB2? String/VarChar :-) Can keep both -- 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] From Ed at Kleban.com Thu Dec 22 15:41:20 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 22 15:42:11 2005 Subject: A Generic Variable In-Reply-To: Message-ID: On 12/22/05 2:55 PM, "Ruslan Zasukhin" wrote: > On 12/22/05 10:07 PM, "Chuck Pelto" wrote: > > Hi Chuck, > >> Is there any type of generic variable that I can use to hold either >> numerical or character/string values from V4RB2? > > String/VarChar :-) > > Can keep both If you are asking whether there is a generic variable type in RB, then the answer is yes, this a the purpose of the type "Variant". A variable declared of this type can hold anything thus the following are all valid statements: dim v as Variant v = 23 v = "abcd" v = 2.334 v = new Dictionary If you are asking if there is a way to represent either a RB numeric or string value in a single field type, then as Ruslan points out, you can certainly convert the value to a string representation and store it in a V2 String or VarChar or Text field, depending upon it's size and various other usage considerations. So if you wanted to store a string for an arbitrary variant you could use: aTable.recId = 23 aTable.aVarCharField.value = v.stringValue ...or... aTable.aVarCharField.value = str(23.44) That answer your question? From Ed at Kleban.com Thu Dec 22 21:06:00 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 22 21:06:50 2005 Subject: Benefits of declaring foreign key links. Message-ID: Ruslan, Page 13 of the Kernel.pdf doc states: " ObjectPtr field works in 4 times faster than FK based on ulong KEY and PTR fields." Why is that? Where does this speed improvement come from? What specific API calls are 4 times faster? Or is this only realized with SQL accesses? I currently have several fields with foreign key records that stored as Byte, UShort, or UMedium because V2 does not yet support BytePtr, ShortPtr, or MediumPtr. But considering the advertised performance improvement, I am tempted to just make these all (long) ObjectPtr fields. The other reason I am tempted to do this is that I see the advantage of having these links explicitly declared so that Valentina Studio will show the related links in the Data Browser. Declaring them as ObjectPtr will do this automatically, although I'll probably want to make sure I name the links as well for clarity. Right now since I'm just using FindValue(anRid), VS is unaware they are links at all. I'm wondering what other performance benefits there may be to declaring them as links. Thanks! --Ed From sunshine at public.kherson.ua Fri Dec 23 09:20:30 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 23 01:21:19 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 5:06 AM, "Ed Kleban" wrote: Hi Ed, > Page 13 of the Kernel.pdf doc states: " ObjectPtr field works in 4 > times faster than FK based on ulong KEY and PTR fields." > > Why is that? > > Where does this speed improvement come from? one index jump instead of 2. Other dbs have also primary index. > What specific API calls are 4 times faster? Or is this only realized with > SQL accesses? In SQL this is JOIN. In API -- other dbs do not have API level, Ed. So we cannot compare here. > I currently have several fields with foreign key records that stored as > Byte, UShort, or UMedium because V2 does not yet support BytePtr, ShortPtr, > or MediumPtr. But considering the advertised performance improvement, I am > tempted to just make these all (long) ObjectPtr fields. Hard to say here. I did not test such combination. I think difference will start visible only for db which have size bigger of your RAM. > The other reason I am tempted to do this is that I see the advantage of > having these links explicitly declared so that Valentina Studio will show > the related links in the Data Browser. Right. Hmm, not right. IF you have also create FOREIGN KEY on your byte fields, then Vstudio also will show links. > Declaring them as ObjectPtr will do > this automatically, although I'll probably want to make sure I name the > links as well for clarity. > Right now since I'm just using FindValue(anRid), > VS is unaware they are links at all. I'm wondering what other performance > benefits there may be to declaring them as links. When yo move from child to parent now: you take byte value. Now you need do index search to find recid of parent. With ObjectPtr you simply get that recID. -- 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] From Ed at Kleban.com Fri Dec 23 10:25:37 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 23 10:26:30 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 1:20 AM, "Ruslan Zasukhin" wrote: > On 12/23/05 5:06 AM, "Ed Kleban" wrote: > > Hi Ed, > >> Page 13 of the Kernel.pdf doc states: " ObjectPtr field works in 4 >> times faster than FK based on ulong KEY and PTR fields." >> >> Why is that? >> >> Where does this speed improvement come from? > > one index jump instead of 2. Meaning that when going from child to parent there is: One binary search to find the child record containing the value_Ptr field, and then a second binary search to locate the parent record containing the matching key field (thus 2 indexed jumps) instead of: One binary search to find the child record containing the ObjectPtr field (thus 1 indexed jump) and then a direct reference from the ObjectPtr field to the desired record of the parent table. ? If so then I would have phrased this differently and said the speed improvement comes from having a direct reference from the child record to the parent record instead of having to do an indexed jump. Or have I misunderstood your point and gotten this wrong? > Other dbs have also primary index. > Um yes they do. But I'm not sure why or how that is relevant. >> What specific API calls are 4 times faster? Or is this only realized with >> SQL accesses? > > In SQL this is JOIN. > Ah, enough said. > In API -- other dbs do not have API level, Ed. So we cannot compare here. > Good point. I knew there was a good reason I picked Valentina. ;-) >> I currently have several fields with foreign key records that stored as >> Byte, UShort, or UMedium because V2 does not yet support BytePtr, ShortPtr, >> or MediumPtr. But considering the advertised performance improvement, I am >> tempted to just make these all (long) ObjectPtr fields. > > Hard to say here. I did not test such combination. > > I think difference will start visible only for db which have size bigger of > your RAM. In terms of how fast a lookup from an ObjectPtr field to a record is compared with a lookup from a Ushort field is? Yes. I agree that the performance difference is negligible unless the short fields mean you'll end up paging less. But I didn't choose the short fields for better performance, I chose them for more efficient storage. >> The other reason I am tempted to do this is that I see the advantage of >> having these links explicitly declared so that Valentina Studio will show >> the related links in the Data Browser. > > Right. > > Hmm, not right. IF you have also create FOREIGN KEY on your byte fields, > then Vstudio also will show links. Yes. I'm aware of that. And the reason behind these questions is to better understand whether I should keep the UByte and UShort fields and continue to use them as pointers manually along with declaring them as links so that VS will see and use them.... Or whether there is some additional benefit to instead using ObjectPtr fields instead because of some performance gain I am unaware of at the cost of using a lot more storage. So far my conclusion based on what I've read here is that there is no real advantage to using an ObjectPtr over using a smaller-sized UByte or UShort rid reference field AS IF it were a BytePtr or ShortPtr in my code, and declaring it to be a foreign key link with the RecId of the parent table being the key field. That make sense? >> Declaring them as ObjectPtr will do >> this automatically, although I'll probably want to make sure I name the >> links as well for clarity. > >> Right now since I'm just using FindValue(anRid), >> VS is unaware they are links at all. I'm wondering what other performance >> benefits there may be to declaring them as links. > > When yo move from child to parent now: > > you take byte value. Now you need do index search > to find recid of parent. > > With ObjectPtr you simply get that recID. Yes, but one would only need to use FindValue(anRid) to go from the parent to the child. When going from child to parent one can simply use the ObjectPtr as the recID or one can instead use a UByte or UShort value_Ptr to the RecId field of the parent table as if it were a BytePtr or ShortPtr. Ok. Unless you find anything to disagree with in what I've said here, I think I now the issues involved very well. Thanks! --Ed From sunshine at public.kherson.ua Fri Dec 23 22:21:41 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 23 14:22:33 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 6:25 PM, "Ed Kleban" wrote: > If so then I would have phrased this differently and said the speed > improvement comes from having a direct reference from the child record to > the parent record instead of having to do an indexed jump. > > Or have I misunderstood your point and gotten this wrong? Wrong. Issues comes from even SINGLE TABLE. I believe this is described with pictures in Valentina Kernel.pdf Look on ObjectPtr description pages. Main point is: RDBMS have * primary key field. It have PRIMARY index. * index of other field map { f2_value, pk_value } - so you search index f2, then you need jump into pk index. - to optimize this, many RDBMS use hidden _rowid field, so if you choose PK as string, you will not keep strings in f2 index. But you still have 2 index jumps. Valentina instead have { f2_value, recid } after search in f2 index you KNOW recid of record. STOP -- 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] From sunshine at public.kherson.ua Fri Dec 23 22:26:27 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 23 14:27:18 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 6:25 PM, "Ed Kleban" wrote: >>> The other reason I am tempted to do this is that I see the advantage of >>> having these links explicitly declared so that Valentina Studio will show >>> the related links in the Data Browser. >> >> Right. >> >> Hmm, not right. IF you have also create FOREIGN KEY on your byte fields, >> then Vstudio also will show links. > > Yes. I'm aware of that. And the reason behind these questions is to better > understand whether I should keep the UByte and UShort fields and continue to > use them as pointers manually along with declaring them as links so that VS > will see and use them.... > > Or whether there is some additional benefit to instead using ObjectPtr > fields instead because of some performance gain I am unaware of at the cost > of using a lot more storage. > > So far my conclusion based on what I've read here is that there is no real > advantage to using an ObjectPtr over using a smaller-sized UByte or UShort > rid reference field AS IF it were a BytePtr or ShortPtr in my code, and > declaring it to be a foreign key link with the RecId of the parent table > being the key field. > > That make sense? Hard to say. I think can exists db where small win, and can exists case when ObjectPtr win. You can do benchmarks self Actually in DB I meet this always. Exists always few cases and few algorithms, each win in its are. -- 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] From sunshine at public.kherson.ua Fri Dec 23 22:28:07 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 23 14:28:58 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 6:25 PM, "Ed Kleban" wrote: > Yes, but one would only need to use FindValue(anRid) to go from the parent > to the child. When going from child to parent one can simply use the > ObjectPtr as the recID or one can instead use a UByte or UShort value_Ptr to > the RecId field of the parent table as if it were a BytePtr or ShortPtr. Ahaaaaaaaaaaaaaaaaaaaaaaaaaaa! You keep in UByte or UShort value_Ptr RecID values. So yes this should win always. Because files are smaller. > Ok. > > Unless you find anything to disagree with in what I've said here, I think I > now the issues involved very well. -- 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] From Ed at Kleban.com Fri Dec 23 16:04:24 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 23 16:05:17 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 2:21 PM, "Ruslan Zasukhin" wrote: > On 12/23/05 6:25 PM, "Ed Kleban" wrote: > >> If so then I would have phrased this differently and said the speed >> improvement comes from having a direct reference from the child record to >> the parent record instead of having to do an indexed jump. >> >> Or have I misunderstood your point and gotten this wrong? > > Wrong. > > Issues comes from even SINGLE TABLE. > > I believe this is described with pictures in Valentina Kernel.pdf > Look on ObjectPtr description pages. > > Main point is: > > RDBMS have > > * primary key field. It have PRIMARY index. > > * index of other field map > { f2_value, pk_value } > > - so you search index f2, then you need jump into pk index. > > - to optimize this, many RDBMS use hidden _rowid field, > so if you choose PK as string, you will not keep strings > in f2 index. But you still have 2 index jumps. > Ah, I see now. Well then.... That really sucks, doesn't it? What a pointless waste. > Valentina instead have > { f2_value, recid } > > after search in f2 index you KNOW recid of record. STOP > Well, clearly then we should be using Valentina instead of a traditional RDBMS. Perhaps you start using the BBEdit marketing and T-shirt mantra: "Valentina -- It doesn't suck!" From Ed at Kleban.com Fri Dec 23 16:10:51 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 23 16:11:42 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 2:26 PM, "Ruslan Zasukhin" wrote: > On 12/23/05 6:25 PM, "Ed Kleban" wrote: > >>>> The other reason I am tempted to do this is that I see the advantage of >>>> having these links explicitly declared so that Valentina Studio will show >>>> the related links in the Data Browser. >>> >>> Right. >>> >>> Hmm, not right. IF you have also create FOREIGN KEY on your byte fields, >>> then Vstudio also will show links. >> >> Yes. I'm aware of that. And the reason behind these questions is to better >> understand whether I should keep the UByte and UShort fields and continue to >> use them as pointers manually along with declaring them as links so that VS >> will see and use them.... >> >> Or whether there is some additional benefit to instead using ObjectPtr >> fields instead because of some performance gain I am unaware of at the cost >> of using a lot more storage. >> >> So far my conclusion based on what I've read here is that there is no real >> advantage to using an ObjectPtr over using a smaller-sized UByte or UShort >> rid reference field AS IF it were a BytePtr or ShortPtr in my code, and >> declaring it to be a foreign key link with the RecId of the parent table >> being the key field. >> >> That make sense? > > Hard to say. > > I think can exists db where small win, > and can exists case when ObjectPtr win. > > You can do benchmarks self > > Actually in DB I meet this always. Exists always few cases and few > algorithms, each win in its are. > No, I don't think so. One of two things is the case here. Either: a) You can tell me why ObjectPtr has some inherent performance advantage over the use of a Byte or Short as if it were an object ptr because you have some specific optimization built into the API calls that take advantage of an ObjectPtr. [And there is special case handling for ObjectPtrs such as automtically treating them as unique indexed for example] or b) There is no inherent performance advantage of using an ObjectPtr over say a Ulong as if it were an ObjectPtr, and therefore in the case of a Byte, Ushort, or Umedium there are storage benefits of declaring what would otherwise be an ObjectPtr field as Byte or Ushort or Ulong and manually treating it as if it were an ObjectPtr. And I believe that in the next email reply you conclude that (b) is the correct answer to this. From Ed at Kleban.com Fri Dec 23 16:12:40 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 23 16:13:32 2005 Subject: Benefits of declaring foreign key links. In-Reply-To: Message-ID: On 12/23/05 2:28 PM, "Ruslan Zasukhin" wrote: > On 12/23/05 6:25 PM, "Ed Kleban" wrote: > >> Yes, but one would only need to use FindValue(anRid) to go from the parent >> to the child. When going from child to parent one can simply use the >> ObjectPtr as the recID or one can instead use a UByte or UShort value_Ptr to >> the RecId field of the parent table as if it were a BytePtr or ShortPtr. > > Ahaaaaaaaaaaaaaaaaaaaaaaaaaaa! > > You keep in UByte or UShort value_Ptr RecID values. > > So yes this should win always. Because files are smaller. > > Yes. And we've discussed this before, and I have proposed BytePtr, MediumPtr, and ShortPtr before which you have previously proclaimed as a "good idea", and I believe these are already in Mantis. >> Ok. >> >> Unless you find anything to disagree with in what I've said here, I think I >> now the issues involved very well. Ok, now I think we're in synch. Thanks! --Ed From sunshine at public.kherson.ua Sat Dec 24 01:43:29 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 23 17:44:25 2005 Subject: Using OrderedSets Re: [IDEA] BinaryLink that supports order !!! In-Reply-To: Message-ID: On 12/18/05 9:07 AM, "Ed Kleban" wrote: >> Also this give ability improve SQL to do all above operations *and* >> Searches of kind: >> >> find records of table A, which have FIRST child with such conditions.... > >> >> Particular example: >> >> SELECT Person.* >> FROM Person parent, Person child USING Born >> WHERE FIRST child.Name = 'Peter' >> >> To express this right now in Valentina 2 (or in mySQL, Oracle, ... ) >> You must self first of all provide additional column to keep order, spend >> hours to write logic, then do sql as >> >> SELECT Person.* >> FROM Person parent, Person child JOIN parent.id = child.ptr >> WHERE child.Name = 'Peter' and child.index = 1 > >> I underline that The main advantage is not in simpler SQL, but in hours of >> work to implement order manually using additional columns. >> > > The benefits of using OBL therefore are that: > > 1) The OBL saves you the hassle of having to explicitly allocate the > additional column to keep the order, because it effectively moves that > column into the OBL automatically and manages it for you no matter whether > OBL is implemented with (A), (B), or (C) above. This is a benefit you get > whether using OBL from SQL or from API, and... Right! > 2) Perhaps... Actually (1) is the only benefit I can come up with. As you > point out it makes the SQL a little more clear perhaps (at a penalty for > using non-standard SQL) but that's a minor issue. Perhaps you can come up > with some words for other benefits this offers. But (1) is a GREAT benefit. 2 main befits as always in Valentina 1) SIMPLER for developer, because Valentina take care self on stupid error prone, repeating task, that is not so easy for developer. 2) we get MUCH FASTER solution than based on RDBMS way. Now you want to know why. Yes? :-) Because. First of all look how data are stored in that INDEX column for RDBMS: * let you have table with 10-20-50 columns. * one of them is INDEX column. * when you change order of some group, you get N records to update value of INDEX column. * How to update record: right! DB need load into RAM each such record, with all its fields. in fact DB load the whole page where such record is. * Now RDBMS can update value of that record, and go to next. * Ops. RDBMS need yet jump to index and DeleteOld + AddNew It is easy see that the bigger record of table, the more data from disk you need load. I.e. The number of fields in table affect speed of this operation. ------------ Valentina instead will touch very precisely only required group of values to be changed. ---------- Example in numbers: let you have table in million records. let avg size of row is 100 bytes only. let you need correct index in group of 10,000 records. let this 10,000 records located in random order. Hmm, I think this is real life case. so each 100th record is record to be changed. * RDBMS * We have (1M * 100 byte) / 4K = 25,000 pages for table. 100 records * 10 bytes = 10KB this is 3 pages of 4K size. So we need touch each third page of table. We need load about 8300 pages into RAM. Change value, and write them back. 8300 pages * 4 k = 33 MB for read + 33 MB for write. PLUS we have probably index for this field. * Valentina * Valentina need "load - correct - write" in average only 20 Kb. Even better: for operations 'Insert At position' only one page will be touched. Now you can count advantage: at least 70+ MB / 20 Kb = 3500 times. IMHO, not bad. If take the best case for RDBMS -- all records are located together, we get 10K * 100 = 1MB. So we still win 50 times. ---------------------------------------- 3) I can point another advantage, Ed. When db engine *knows* something more it can do things more smart. At least you get advantage, that you can develop some Valentina Database in REALbasic, but this feature will work correctly and in the same way in other languages and IDEs. For example Valentina Studio will correctly you show order of records. Compare to RDBMS. You application know that INDEX field means, and YOUR application have algorithms to work with it. But other apps believe that this is just USHORT column. ------------------------------------ 4) and even 4th advantage can be pointed. * in RDBMS way * to update indexed we need lock records of table. * in Valentina way * we operate on Binary Link, so records of table is not locked. This can be good for multi-user concurrency. -- 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] From Ed at Kleban.com Fri Dec 23 18:31:18 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 23 18:32:13 2005 Subject: Using OrderedSets Re: [IDEA] BinaryLink that supports order !!! In-Reply-To: Message-ID: On 12/23/05 5:43 PM, "Ruslan Zasukhin" wrote: > On 12/18/05 9:07 AM, "Ed Kleban" wrote: > [Since Ruslan has posted this public reply to my formerly private message (which is fine) I'll point out for those who are now joining the thread and trying to make sense of it that "OBL" refers to the OrderedBinaryLink concept Ruslan has proposed implementing in a future version of Valentina.] >> >> The benefits of using OBL therefore are that: >> >> 1) The OBL saves you the hassle of having to explicitly allocate the >> additional column to keep the order, because it effectively moves that >> column into the OBL automatically and manages it for you no matter whether >> OBL is implemented with (A), (B), or (C) above. This is a benefit you get >> whether using OBL from SQL or from API, and... [(A), (B), and (C) being three possible different ways I had concluded that Ruslan might choose to implement OBL] > > Right! > >> 2) Perhaps... Actually (1) is the only benefit I can come up with. As you >> point out it makes the SQL a little more clear perhaps (at a penalty for >> using non-standard SQL) but that's a minor issue. Perhaps you can come up >> with some words for other benefits this offers. But (1) is a GREAT benefit. > > 2 main befits as always in Valentina > > 1) SIMPLER for developer, because Valentina take care self on stupid > error prone, repeating task, that is not so easy for developer. Which is a restatement of (1) above. > > 2) we get MUCH FASTER solution than based on RDBMS way. Which is what you explain quite wonderfully in great detail below. However, I don't think that any of the benefits you describe below are necessarily benefits of using OrderedBinaryLinks, but rather they are inherent benefits of Valentina; namely from the fact that V2 supports Binary Links in the first place, and more fundamentally because: a) Each field of a record is stored as a separate logical construct, thus obviating the need for reading in all of the field values for any record that is examined. b) RecIds do not change when new insertions, deletions or updates occur. c) The field values required for implementing binary links are not stored as fields in the records of the tables they define relationships between. > Now you want to know why. Yes? :-) You know me too well. ;-) Yes, of course. I always want to know why. > Because. First of all look how data are stored in that INDEX column for > RDBMS: > > * let you have table with 10-20-50 columns. > * one of them is INDEX column. > > * when you change order of some group, you get N records to > update value of INDEX column. > > * How to update record: right! > DB need load into RAM each such record, with all its fields. > in fact DB load the whole page where such record is. > > * Now RDBMS can update value of that record, and go to next. > > * Ops. RDBMS need yet jump to index and DeleteOld + AddNew ["Oops"] > > It is easy see that the bigger record of table, the more data from disk you > need load. I.e. The number of fields in table affect speed of this > operation. and the more that local Valentina and system virtual memory paging works against you to make things slower instead of working for you to make things faster as it does for Valentina > > ------------ > Valentina instead will touch very precisely only required group of values to > be changed. > > > ---------- > Example in numbers: > > let you have table in million records. > let avg size of row is 100 bytes only. > let you need correct index in group of 10,000 records. > > let this 10,000 records located in random order. > Hmm, I think this is real life case. > so each 100th record is record to be changed. > > > * RDBMS * > > We have (1M * 100 byte) / 4K = 25,000 pages for table. > > 100 records * 10 bytes = 10KB this is 3 pages of 4K size. > So we need touch each third page of table. > > We need load about 8300 pages into RAM. Change value, > and write them back. > > 8300 pages * 4 k = 33 MB for read + 33 MB for write. > > PLUS we have probably index for this field. > > > * Valentina * > > Valentina need "load - correct - write" in average only 20 Kb. > > Even better: for operations 'Insert At position' > only one page will be touched. > > Now you can count advantage: > at least 70+ MB / 20 Kb = 3500 times. > > IMHO, not bad. Sorry Ruslan, but you should not be permitted to use the abbreviation "IMHO", because just like me your opinions are rarely ever humble. > If take the best case for RDBMS -- all records are located together, we get > 10K * 100 = 1MB. So we still win 50 times. > > ---------------------------------------- > 3) I can point another advantage, Ed. > When db engine *knows* something more it can do things more smart. > > At least you get advantage, that you can develop some Valentina Database in > REALbasic, but this feature will work correctly and in the same way in other > languages and IDEs. For example Valentina Studio will correctly you show > order of records. > > Compare to RDBMS. You application know that INDEX field means, and YOUR > application have algorithms to work with it. But other apps believe that > this is just USHORT column. > Yes. But if you implement BytePtr, MediumPtr, and ShortPtr as we have discussed, then not only will my app know it but other V2-savvy apps such as Valentina Studio will know it and can take advantage of it as well. In the mean time I can declare these as foreign key links to provide clues to both SQL statements that view this as a traditional RDBMS and to applications like Valentina Studio. While in my own code I can use API calls to treat these as if the were in fact ObjectPtr fields, and thus gain 100% of the performance benefits with additional 25% to 75% storage benefit, plus any additional performance benefit that comes from less paging due to smaller table sizes. > ------------------------------------ > 4) and even 4th advantage can be pointed. > > * in RDBMS way * to update indexed we need lock records of table. > > * in Valentina way * we operate on Binary Link, so records of table is not > locked. This can be good for multi-user concurrency. > Hmm... I've been ignoring concurrency issues so far, but sooner or later I'll have to deal with those. I need to think about these some more before I will be ready to discuss them. Thanks for the tutorial Ruslan. You make a great sales pitch! I guess I can live with a database that offer performance that is 50 to 3500 times faster than using SQL with a traditional RDMS storage structure. But keep reading that email you are replying to. I'd like to get another very large boost in performance by having API calls that treat VArraySets as Ordered sets so that I can avoid making calls to do what you describe above more than once instead of making repeated calls throughout the execution of my application. --Ed From Ed at Kleban.com Wed Dec 28 11:52:12 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 11:53:17 2005 Subject: Sizes and checks Message-ID: 1) FYI: The latest ValentinaKernel_2_en.pdf manual I have (which having no version number is impossible to tell if is the same current version you have) on page 74 notes: " When using a VarChar field, there is no benefit (in terms of speed or disk space) to using a value of less than 504 bytes because it stores characters in logical pages. " Is this an out of date comment that should instead be using some number like 1022? 2) V4RB Reference page 36 notes for VDataBase.Create that the default cluster inSegmentSize is 32KB. What are the benefits or disadvantages of making this bigger or smaller, such as 8 KB, 16 KB, 64 KB or 128 KB? Is there benefit to tuning this parameter based upon available memory at runtime on a users machine, or is it more dependent upon the inherent nature of the tables and the types of data access being performed? 3) I see lots of good updated info in both manuals. Great work! The info on the inCacheSize parameter for the Init method is very informative and useful. 4) The V4RB Ref section on "Converting V4RB 1.x projects to 2.0" states: ? Valentina.Init() doesn?t return a value anymore. Use the CacheSize properties to check if the database was properly initiated. However there is no mention in the Initialization section that checking CacheSize is a good check to make. 5) I haven't tracked down the reason yet, but apparently when I already have a copy of my program running that is actively using a valentina database of a given name, running another program that attempts to create or open an database of the same name simply dies. I'm assuming that it shouldn't do that? What's the proper check to make for this condition? Thanks! --Ed From sunshine at public.kherson.ua Wed Dec 28 20:00:48 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 12:01:49 2005 Subject: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 7:52 PM, "Ed Kleban" wrote: Hi Ed, > 1) FYI: The latest ValentinaKernel_2_en.pdf manual I have (which having no > version number is impossible to tell if is the same current version you > have) on page 74 notes: > > " When using a VarChar field, there is no benefit (in terms of speed or > disk space) to using a value of less than 504 bytes because it stores > characters in logical pages. " > > Is this an out of date comment that should instead be using some number like > 1022? Yes should be corrected, thank you -- 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] From sunshine at public.kherson.ua Wed Dec 28 20:05:11 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 12:06:14 2005 Subject: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 7:52 PM, "Ed Kleban" wrote: > 2) V4RB Reference page 36 notes for VDataBase.Create that the default > cluster inSegmentSize is 32KB. > > What are the benefits or disadvantages of making this bigger or smaller, > such as 8 KB, 16 KB, 64 KB or 128 KB? > Is there benefit to tuning this parameter based upon available memory at > runtime on a users machine, or is it more dependent upon the inherent nature > of the tables and the types of data access being performed? Segment size affects only A) how many of disk is allocated for logical file, when it need new space. B) the small segment size, the more segments a file have. so the longer is list/tree of segments to check to find required. Btw, segment size affect initial size of _empty_ db. You could note that empty db can east 5-10-20 MB. -- 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] From sunshine at public.kherson.ua Wed Dec 28 20:07:10 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 12:08:11 2005 Subject: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 7:52 PM, "Ed Kleban" wrote: > 5) I haven't tracked down the reason yet, but apparently when I already have > a copy of my program running that is actively using a valentina database of > a given name, running another program that attempts to create or open an > database of the same name simply dies. I'm assuming that it shouldn't do > that? What's the proper check to make for this condition? This should be investigated more deep. I think such issue exists only on OS X, because OS X do not have exclusive file open mode. -- 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] From Ed at Kleban.com Wed Dec 28 12:21:48 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 12:22:52 2005 Subject: Init Check Bug? Re: Sizes and checks In-Reply-To: Message-ID: > 4) The V4RB Ref section on "Converting V4RB 1.x projects to 2.0" states: > > ? Valentina.Init() doesn?t return a value anymore. Use the CacheSize > properties to check if the database was properly initiated. > > However there is no mention in the Initialization section that checking > CacheSize is a good check to make. > The following code in 2.1 fc1 results in an alert with the following message: Database failed to initialize. CacheSize = 6.711296e+7 So what should one test for? Valentina.cacheSize > 0 ? What is this strange value 6711296_ ? 64 * 1024 * 1024 = 67108864 The database continues to work fine of course. ============ const ValentinaCacheMB = 64 dim ValentinaCacheSize as Integer ValentinaCacheSize = ValentinaCacheMB * 1024 * 1024 Valentina.Init( ValentinaCacheSize, MacKey, WinKey ) if Valentina.cacheSize <> ValentinaCacheSize then alert( here, "Database failed to initialize. CacheSize = " _ + str(Valentina.cacheSize) ) From Ed at Kleban.com Wed Dec 28 12:31:59 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 12:33:19 2005 Subject: Death on recreate Re: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 12:07 PM, "Ruslan Zasukhin" wrote: > On 12/28/05 7:52 PM, "Ed Kleban" wrote: > >> 5) I haven't tracked down the reason yet, but apparently when I already have >> a copy of my program running that is actively using a valentina database of >> a given name, running another program that attempts to create or open an >> database of the same name simply dies. I'm assuming that it shouldn't do >> that? What's the proper check to make for this condition? > > This should be investigated more deep. > > I think such issue exists only on OS X, because OS X do not have exclusive > file open mode. Failure occurs on the following line: aProjDB.Create( f, dbMode , REALinsightApp.kValentinaSegmentSize ) where f is non-nil, read/write not locked, exists dbMode = 1 segmentSize = 32 * 1024 No crash log, no report, no exception... just sudden death. ===== Any suggestions of what checks, tests, etc I should/could perform? I guess worst case I could keep a separate global file that all my apps check to see which database files they have open for use. From Ed at Kleban.com Wed Dec 28 13:23:38 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 13:24:47 2005 Subject: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 12:05 PM, "Ruslan Zasukhin" wrote: > On 12/28/05 7:52 PM, "Ed Kleban" wrote: > >> 2) V4RB Reference page 36 notes for VDataBase.Create that the default >> cluster inSegmentSize is 32KB. >> >> What are the benefits or disadvantages of making this bigger or smaller, >> such as 8 KB, 16 KB, 64 KB or 128 KB? > >> Is there benefit to tuning this parameter based upon available memory at >> runtime on a users machine, or is it more dependent upon the inherent nature >> of the tables and the types of data access being performed? > > Segment size affects only > > A) how many of disk is allocated for logical file, when it need new space. > > B) the small segment size, the more segments a file have. > so the longer is list/tree of segments to check to find required. > > Btw, segment size affect initial size of _empty_ db. > You could note that empty db can east 5-10-20 MB. > "east" ? From sunshine at public.kherson.ua Wed Dec 28 23:21:01 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 15:22:03 2005 Subject: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 9:23 PM, "Ed Kleban" wrote: >> Segment size affects only >> >> A) how many of disk is allocated for logical file, when it need new space. >> >> B) the small segment size, the more segments a file have. >> so the longer is list/tree of segments to check to find required. >> >> Btw, segment size affect initial size of _empty_ db. >> You could note that empty db can east 5-10-20 MB. >> > "east" ? eat -- 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] From sunshine at public.kherson.ua Wed Dec 28 23:23:51 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 15:24:56 2005 Subject: Init Check Bug? Re: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 8:21 PM, "Ed Kleban" wrote: Hi Ed, > The following code in 2.1 fc1 results in an alert with the following > message: > > Database failed to initialize. CacheSize = 6.711296e+7 > > So what should one test for? Valentina.cacheSize > 0 ? > > What is this strange value 6711296_ ? > > 64 * 1024 * 1024 = 67108864 > > The database continues to work fine of course. > > ============ > > > const ValentinaCacheMB = 64 > dim ValentinaCacheSize as Integer > ValentinaCacheSize = ValentinaCacheMB * 1024 * 1024 > > Valentina.Init( ValentinaCacheSize, MacKey, WinKey ) > > if Valentina.cacheSize <> ValentinaCacheSize then > alert( here, "Database failed to initialize. CacheSize = " _ > + str(Valentina.cacheSize) ) Actually this is wrong idea check init success in SUCH way. Because if you ask TOO many RAM for cache, Valentina can allocate less. So you cannot compare. ------ Strange number ... Looks to be in FLOAT way. Hmm. Valentina.cacheSize declared as integer ? I think, this is RB glitch, may be you need Foramt() -- 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] From sunshine at public.kherson.ua Wed Dec 28 23:37:15 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 15:38:17 2005 Subject: Death on recreate In-Reply-To: Message-ID: On 12/28/05 8:31 PM, "Ed Kleban" wrote: > On 12/28/05 12:07 PM, "Ruslan Zasukhin" wrote: > >> On 12/28/05 7:52 PM, "Ed Kleban" wrote: >> >>> 5) I haven't tracked down the reason yet, but apparently when I already have >>> a copy of my program running that is actively using a valentina database of >>> a given name, running another program that attempts to create or open an >>> database of the same name simply dies. I'm assuming that it shouldn't do >>> that? What's the proper check to make for this condition? >> >> This should be investigated more deep. >> >> I think such issue exists only on OS X, because OS X do not have exclusive >> file open mode. > > > Failure occurs on the following line: > > aProjDB.Create( f, dbMode , REALinsightApp.kValentinaSegmentSize ) > > where f is non-nil, read/write not locked, exists > dbMode = 1 > segmentSize = 32 * 1024 > > No crash log, no report, no exception... just sudden death. > > ===== > > Any suggestions of what checks, tests, etc I should/could perform? > > I guess worst case I could keep a separate global file that all my apps > check to see which database files they have open for use. Yes such LOCK FILE -- is standard technique from *nix, which Apple also suggest to use on OS X -- 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] From Ed at Kleban.com Wed Dec 28 15:37:49 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 15:38:53 2005 Subject: Init Check Bug? Re: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 3:23 PM, "Ruslan Zasukhin" wrote: > On 12/28/05 8:21 PM, "Ed Kleban" wrote: > >> if Valentina.cacheSize <> ValentinaCacheSize then >> alert( here, "Database failed to initialize. CacheSize = " _ >> + str(Valentina.cacheSize) ) > > Actually this is wrong idea check init success in SUCH way. > > Because if you ask TOO many RAM for cache, Valentina can allocate less. > So you cannot compare. That explains the difference. But what is the correct test? Should I test for Valentina.cacheSize > 0 ??? > ------ > Strange number ... Looks to be in FLOAT way. > Hmm. Valentina.cacheSize declared as integer ? > > I think, this is RB glitch, may be you need Foramt() > Yes, it's the result of the "str" function which resorts to scientific notation if the number of significant digits is large, including for integers. Rumor has it that it won't be doing so for much longer. From Ed at Kleban.com Wed Dec 28 15:50:49 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 15:51:52 2005 Subject: Death on recreate In-Reply-To: Message-ID: On 12/28/05 3:37 PM, "Ruslan Zasukhin" wrote: > On 12/28/05 8:31 PM, "Ed Kleban" wrote: > >> On 12/28/05 12:07 PM, "Ruslan Zasukhin" wrote: >> >> Any suggestions of what checks, tests, etc I should/could perform? >> >> I guess worst case I could keep a separate global file that all my apps >> check to see which database files they have open for use. > > Yes such LOCK FILE -- is standard technique from *nix, which Apple also > suggest to use on OS X > Ok. I'll add a .vdb.lock file to check. And hopefully you'll make some appropriate change to Valentina so my app won't experience sudden death if I fail to check. Thanks! --Ed From sunshine at public.kherson.ua Thu Dec 29 00:11:59 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Wed Dec 28 16:13:01 2005 Subject: Init Check Bug? Re: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 11:37 PM, "Ed Kleban" wrote: >>> if Valentina.cacheSize <> ValentinaCacheSize then >>> alert( here, "Database failed to initialize. CacheSize = " _ >>> + str(Valentina.cacheSize) ) >> >> Actually this is wrong idea check init success in SUCH way. >> >> Because if you ask TOO many RAM for cache, Valentina can allocate less. >> So you cannot compare. > > That explains the difference. But what is the correct test? > Should I test for > Valentina.cacheSize > 0 > ??? Yes Also if Init fails exception can be thrown. -- 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] From Ed at Kleban.com Wed Dec 28 16:42:54 2005 From: Ed at Kleban.com (Ed Kleban) Date: Wed Dec 28 16:43:59 2005 Subject: Init Check Bug? Re: Sizes and checks In-Reply-To: Message-ID: On 12/28/05 4:11 PM, "Ruslan Zasukhin" wrote: > On 12/28/05 11:37 PM, "Ed Kleban" wrote: > >>>> if Valentina.cacheSize <> ValentinaCacheSize then >>>> alert( here, "Database failed to initialize. CacheSize = " _ >>>> + str(Valentina.cacheSize) ) >>> >>> Actually this is wrong idea check init success in SUCH way. >>> >>> Because if you ask TOO many RAM for cache, Valentina can allocate less. >>> So you cannot compare. >> >> That explains the difference. But what is the correct test? >> Should I test for >> Valentina.cacheSize > 0 >> ??? > > Yes > > Also if Init fails exception can be thrown. Great. I'll fix the code. You fix the documentation. Deal? From cbpelto at pcisys.net Thu Dec 29 09:23:00 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 10:24:06 2005 Subject: Won't Run Second Time Message-ID: <8505D493-1199-4010-A271-37FEBFC88F6A@pcisys.net> What am I doing wrong here? Using V4RB2 I've built a Valentina database that runs when it is created, but I'm getting a nilObjectException when for the database when I run the app a second time and it uses the Open function instead of the Create. At the App level it shows the database as being recognized, but if I click down to the tables level, they are all 'nil'. Regards, Chuck From maxprog at mac.com Thu Dec 29 17:28:59 2005 From: maxprog at mac.com (Stan Busk) Date: Thu Dec 29 10:30:06 2005 Subject: Won't Run Second Time In-Reply-To: <8505D493-1199-4010-A271-37FEBFC88F6A@pcisys.net> References: <8505D493-1199-4010-A271-37FEBFC88F6A@pcisys.net> Message-ID: Hi, In your VDatabase constructor you have to call parent constructor adding this line as the first line: VDatabase( EVStorageType.kDisk ) ~/Stan > What am I doing wrong here? > > Using V4RB2 I've built a Valentina database that runs when it is > created, but I'm getting a nilObjectException when for the database > when I run the app a second time and it uses the Open function > instead of the Create. > > At the App level it shows the database as being recognized, but if > I click down to the tables level, they are all 'nil'. > > Regards, > > Chuck > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From Ed at Kleban.com Thu Dec 29 10:31:22 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 29 10:32:31 2005 Subject: Won't Run Second Time In-Reply-To: <8505D493-1199-4010-A271-37FEBFC88F6A@pcisys.net> Message-ID: Are you sure that you did a "flush" before closing the app, and that you declared that disk be used for storage rather than RAM? On 12/29/05 10:23 AM, "Chuck Pelto" wrote: > What am I doing wrong here? > > Using V4RB2 I've built a Valentina database that runs when it is > created, but I'm getting a nilObjectException when for the database > when I run the app a second time and it uses the Open function > instead of the Create. > > At the App level it shows the database as being recognized, but if I > click down to the tables level, they are all 'nil'. > > Regards, > > Chuck > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From cbpelto at pcisys.net Thu Dec 29 09:44:01 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 10:45:06 2005 Subject: Won't Run Second Time In-Reply-To: References: <8505D493-1199-4010-A271-37FEBFC88F6A@pcisys.net> Message-ID: On Dec 29, 2005, at 9:28 AM, Stan Busk wrote: > In your VDatabase constructor you have to call parent constructor > adding this line as the first line: > > VDatabase( EVStorageType.kDisk ) That doesn't seem to help. Furthermore, in the tutorial that came with V4RB2 there is no such call being made. I do have a call for VDatabase() in my problem app already, however it uses inStorageType = 0 as it's param. Chuck From cbpelto at pcisys.net Thu Dec 29 10:03:58 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 11:05:02 2005 Subject: Won't Run Second Time In-Reply-To: References: <8505D493-1199-4010-A271-37FEBFC88F6A@pcisys.net> Message-ID: On Dec 29, 2005, at 9:44 AM, Chuck Pelto wrote: > Furthermore, in the tutorial that came with V4RB2 there is no such > call being made. Correction. I found the VDatabase call in the tutorial. But, as I said, I already have that in my problem app. So, why does it work the first time, when it is created, but not the second, when I try to reopen it? Regards, Chuck From cbpelto at pcisys.net Thu Dec 29 10:47:31 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 11:48:36 2005 Subject: Won't Run Second Time In-Reply-To: References: Message-ID: On Dec 29, 2005, at 9:31 AM, Ed Kleban wrote: > Are you sure that you did a "flush" before closing the app, and > that you > declared that disk be used for storage rather than RAM? No and Yes. However, I don't see, in the examples provided by Paradigma, where FLUSH() is being called before closing the database. Again, an important indicator of the problem is that the call to Open the database works, but looking at the values after the open call has passed, all the tables are 'nil'. Whereas the database itself has a valid value. Chuck From yeomans at desuetude.com Thu Dec 29 12:51:36 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 11:52:42 2005 Subject: problem opening remote database Message-ID: I have the following problem. I have a VServer 2.0.5 hosting two databases. I can open the second database; that is, db.Open succeeds, but it has 0 tables. Opening the first database works just fine. I've tried rebooting a few times. Any idea as to what might be the problem? -------------- Charles Yeomans From IvanSmahin at public.kherson.ua Thu Dec 29 20:49:16 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Thu Dec 29 12:50:17 2005 Subject: problem opening remote database In-Reply-To: References: Message-ID: <1409307741.20051229204916@public.kherson.ua> Hello Charles, Thursday, December 29, 2005, 7:51:36 PM, you wrote: CY> I have the following problem. I have a VServer 2.0.5 hosting two CY> databases. I can open the second database; that is, db.Open succeeds, CY> but it has 0 tables. Opening the first database works just fine. I've CY> tried rebooting a few times. Any idea as to what might be the problem? Could you open the second database "locally"? Is it any table there in this case? Also, please try to diagnose that db. -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From Ed at Kleban.com Thu Dec 29 13:48:35 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 29 13:49:43 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: What examples are you looking at? Are you using the Classes way or the API way or SQL way or some other way. And who invented this "way" terminology in the first place? No, don't answer that one. I think I already know who the way meister is. ;-) --Ed On 12/29/05 11:47 AM, "Chuck Pelto" wrote: > > On Dec 29, 2005, at 9:31 AM, Ed Kleban wrote: > >> Are you sure that you did a "flush" before closing the app, and >> that you >> declared that disk be used for storage rather than RAM? > > No and Yes. > > However, I don't see, in the examples provided by Paradigma, where > FLUSH() is being called before closing the database. > > Again, an important indicator of the problem is that the call to Open > the database works, but looking at the values after the open call has > passed, all the tables are 'nil'. Whereas the database itself has a > valid value. > > Chuck > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From cbpelto at pcisys.net Thu Dec 29 13:12:23 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 14:13:29 2005 Subject: Won't Run Second Time In-Reply-To: References: Message-ID: <191F23F6-11AB-4EE0-B88F-54CC13146177@pcisys.net> On Dec 29, 2005, at 12:48 PM, Ed Kleban wrote: > What examples are you looking at? Are you using the Classes way or > the API > way or SQL way or some other way. > > And who invented this "way" terminology in the first place? No, don't > answer that one. I think I already know who the way meister is. ;-) Interesting question. I asked Ruslan a while back if there was more than one 'way' to build the database structure. His reply indicated there was only ONE way to build it. However, looking at the various 'examples', there seems to be more than one 'way' to build the structure of the database. For example, there's the example of Single Table, which I'm using. Then there is the example in the tutorial, which is a completely different 'way'. The impression I got from Ruslan's answer was that the various 'ways' related to ways one could access the data once the database was established. Ruslan, We need BETTER and more thoroughly described examples. I've asked this on numerous occasions, but I get the distinct impression my requests to improve this system are falling on deaf ears. Regards, Chuck From Ed at Kleban.com Thu Dec 29 14:35:23 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 29 14:36:28 2005 Subject: Won't Run Second Time In-Reply-To: <191F23F6-11AB-4EE0-B88F-54CC13146177@pcisys.net> Message-ID: On 12/29/05 2:12 PM, "Chuck Pelto" wrote: > > On Dec 29, 2005, at 12:48 PM, Ed Kleban wrote: > >> What examples are you looking at? Are you using the Classes way or >> the API >> way or SQL way or some other way. >> >> And who invented this "way" terminology in the first place? No, don't >> answer that one. I think I already know who the way meister is. ;-) > > Interesting question. I asked Ruslan a while back if there was more > than one 'way' to build the database structure. A question phrased in this manner begs the question of which meaning of the term "way" you mean. > His reply indicated > there was only ONE way to build it. And so does such a restatement of a reply. > However, looking at the various > 'examples', there seems to be more than one 'way' to build the > structure of the database. And again. > For example, there's the example of Single > Table, which I'm using. Then there is the example in the tutorial, > which is a completely different 'way'. > > The impression I got from Ruslan's answer was that the various 'ways' > related to ways one could access the data once the database was > established. I believe your impression is not an accurate one. > Ruslan, > > We need BETTER and more thoroughly described examples. I've asked > this on numerous occasions, but I get the distinct impression my > requests to improve this system are falling on deaf ears. > > Regards, > > Chuck LOL. I constantly give Ruslan and his crew all manner of grief on the quality and content of their documentation. Interestingly however this is one case where I disagree with your concern and in fact think they do a rather excellent job of documenting the different "ways". My question above regarding the use of the term "way" was a bit tongue in cheek and rhetorical. As a concept I really like the various "way"s documented for creating and accessing a V2 database. As a term, well usage of the term "way" brings up all manner of grammatical problems and ambiguities as you've just demonstrated. A better choice of term might have been "style" rather than way. Whereas the documentation is fairly clear in terms of documenting the differences among the different styles if you can get past the problems with using the term "way", the Examples are simply excellent and indeed are nicely sorted into separate folders by coding style. So my little jab at the way-meister is really a suggestion I guess that in V3 or V4 it might be better to overhaul all of the documentation to use a more intuitive and less problematic term such as "style" instead of "way". But it wouldn't be nearly as homey nor what I consider to be classic Ruslan as usage of the current term way, which I've come to find very clear, very distinctively Valentinsh. --Ed From yeomans at desuetude.com Thu Dec 29 15:51:43 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 14:52:49 2005 Subject: problem opening remote database In-Reply-To: <1409307741.20051229204916@public.kherson.ua> References: <1409307741.20051229204916@public.kherson.ua> Message-ID: <7ec2576f1d7b6e3546b4af19b15339c4@desuetude.com> On Dec 29, 2005, at 1:49 PM, Ivan Smahin wrote: > Hello Charles, > > Thursday, December 29, 2005, 7:51:36 PM, you wrote: > > CY> I have the following problem. I have a VServer 2.0.5 hosting two > CY> databases. I can open the second database; that is, db.Open > succeeds, > CY> but it has 0 tables. Opening the first database works just fine. > I've > CY> tried rebooting a few times. Any idea as to what might be the > problem? > > Could you open the second database "locally"? > Is it any table there in this case? > Also, please try to diagnose that db. Good suggestion. It appears that the database files became corrupted in the process of registering them. -------------- Charles Yeomans From IvanSmahin at public.kherson.ua Thu Dec 29 23:00:25 2005 From: IvanSmahin at public.kherson.ua (Ivan Smahin) Date: Thu Dec 29 15:01:25 2005 Subject: problem opening remote database In-Reply-To: <7ec2576f1d7b6e3546b4af19b15339c4@desuetude.com> References: <1409307741.20051229204916@public.kherson.ua> <7ec2576f1d7b6e3546b4af19b15339c4@desuetude.com> Message-ID: <101488704.20051229230025@public.kherson.ua> Hello Charles, Thursday, December 29, 2005, 10:51:43 PM, you wrote: CY> On Dec 29, 2005, at 1:49 PM, Ivan Smahin wrote: >> Hello Charles, >> >> Thursday, December 29, 2005, 7:51:36 PM, you wrote: >> >> CY> I have the following problem. I have a VServer 2.0.5 hosting two >> CY> databases. I can open the second database; that is, db.Open >> succeeds, >> CY> but it has 0 tables. Opening the first database works just fine. >> I've >> CY> tried rebooting a few times. Any idea as to what might be the >> problem? >> >> Could you open the second database "locally"? >> Is it any table there in this case? >> Also, please try to diagnose that db. CY> Good suggestion. It appears that the database files became corrupted CY> in the process of registering them. Strange. Actually the registration procedure is not so hard to get database be corrupted. But, what does diagnose say? -- Best regards, Ivan mailto:IvanSmahin@public.kherson.ua From Ed at Kleban.com Thu Dec 29 15:01:43 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 29 15:02:48 2005 Subject: problem opening remote database In-Reply-To: <7ec2576f1d7b6e3546b4af19b15339c4@desuetude.com> Message-ID: Uh, pardon? Can you define "registering" with some more words, like which call does that? Thanks. --Ed On 12/29/05 2:51 PM, "Charles Yeomans" wrote: > > On Dec 29, 2005, at 1:49 PM, Ivan Smahin wrote: > >> Hello Charles, >> >> Thursday, December 29, 2005, 7:51:36 PM, you wrote: >> >> CY> I have the following problem. I have a VServer 2.0.5 hosting two >> CY> databases. I can open the second database; that is, db.Open >> succeeds, >> CY> but it has 0 tables. Opening the first database works just fine. >> I've >> CY> tried rebooting a few times. Any idea as to what might be the >> problem? >> >> Could you open the second database "locally"? >> Is it any table there in this case? >> Also, please try to diagnose that db. > > Good suggestion. It appears that the database files became corrupted > in the process of registering them. > > -------------- > Charles Yeomans > > _______________________________________________ > Valentina mailing list > Valentina@lists.macserve.net > http://lists.macserve.net/mailman/listinfo/valentina From yeomans at desuetude.com Thu Dec 29 16:26:51 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 15:27:56 2005 Subject: problem opening remote database In-Reply-To: <101488704.20051229230025@public.kherson.ua> References: <1409307741.20051229204916@public.kherson.ua> <7ec2576f1d7b6e3546b4af19b15339c4@desuetude.com> <101488704.20051229230025@public.kherson.ua> Message-ID: <775db53b8e545be6c8e18a89c8477d50@desuetude.com> On Dec 29, 2005, at 4:00 PM, Ivan Smahin wrote: > Hello Charles, > > Thursday, December 29, 2005, 10:51:43 PM, you wrote: > > CY> On Dec 29, 2005, at 1:49 PM, Ivan Smahin wrote: > >>> Hello Charles, >>> >>> Thursday, December 29, 2005, 7:51:36 PM, you wrote: >>> >>> CY> I have the following problem. I have a VServer 2.0.5 hosting two >>> CY> databases. I can open the second database; that is, db.Open >>> succeeds, >>> CY> but it has 0 tables. Opening the first database works just fine. >>> I've >>> CY> tried rebooting a few times. Any idea as to what might be the >>> problem? >>> >>> Could you open the second database "locally"? >>> Is it any table there in this case? >>> Also, please try to diagnose that db. > > CY> Good suggestion. It appears that the database files became > corrupted > CY> in the process of registering them. > > Strange. > Actually the registration procedure is not so hard to get database be > corrupted. > > But, what does diagnose say? It fails with error 365826, "internal error". -------------- Charles Yeomans From yeomans at desuetude.com Thu Dec 29 16:27:29 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 15:28:32 2005 Subject: problem opening remote database In-Reply-To: References: Message-ID: <1476beaee47ccbc52486ca58f7db1fdf@desuetude.com> Uh, that would be VServer.RegisterDatabase. Charles Yeomans On Dec 29, 2005, at 4:01 PM, Ed Kleban wrote: > Uh, pardon? Can you define "registering" with some more words, like > which > call does that? > > Thanks. > --Ed > > > On 12/29/05 2:51 PM, "Charles Yeomans" wrote: > >> >> On Dec 29, 2005, at 1:49 PM, Ivan Smahin wrote: >> >>> Hello Charles, >>> >>> Thursday, December 29, 2005, 7:51:36 PM, you wrote: >>> >>> CY> I have the following problem. I have a VServer 2.0.5 hosting two >>> CY> databases. I can open the second database; that is, db.Open >>> succeeds, >>> CY> but it has 0 tables. Opening the first database works just fine. >>> I've >>> CY> tried rebooting a few times. Any idea as to what might be the >>> problem? >>> >>> Could you open the second database "locally"? >>> Is it any table there in this case? >>> Also, please try to diagnose that db. >> >> Good suggestion. It appears that the database files became corrupted >> in the process of registering them. From sunshine at public.kherson.ua Thu Dec 29 23:33:37 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 15:34:42 2005 Subject: problem opening remote database In-Reply-To: <1476beaee47ccbc52486ca58f7db1fdf@desuetude.com> Message-ID: On 12/29/05 11:27 PM, "Charles Yeomans" wrote: Hi Charles, > Uh, that would be VServer.RegisterDatabase Can you reproduce ? Although in 2.1 we have try improve a lots stability ... -- 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] From Ed at Kleban.com Thu Dec 29 15:34:16 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 29 15:35:22 2005 Subject: problem opening remote database In-Reply-To: <1476beaee47ccbc52486ca58f7db1fdf@desuetude.com> Message-ID: Ah, remote server. of course. I've been doing everything locally. Thanks. On 12/29/05 3:27 PM, "Charles Yeomans" wrote: > Uh, that would be VServer.RegisterDatabase. > > Charles Yeomans > > On Dec 29, 2005, at 4:01 PM, Ed Kleban wrote: > >> Uh, pardon? Can you define "registering" with some more words, like >> which >> call does that? >> >> Thanks. >> --Ed >> From sunshine at public.kherson.ua Thu Dec 29 23:36:12 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 15:37:26 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: On 12/29/05 10:35 PM, "Ed Kleban" wrote: >> For example, there's the example of Single >> Table, which I'm using. Then there is the example in the tutorial, >> which is a completely different 'way'. >> >> The impression I got from Ruslan's answer was that the various 'ways' >> related to ways one could access the data once the database was >> established. > > I believe your impression is not an accurate one. Moment. "Ways" -- this is only style of coding. Choosed way, DO NOT affect database data on disk You can make your db in API way, but I will use it in viSQL with SQL way. Or visa versa. -- 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] From yeomans at desuetude.com Thu Dec 29 16:40:20 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 15:41:24 2005 Subject: problem opening remote database In-Reply-To: References: Message-ID: <5bf60c7399de147647ae2803ad149bff@desuetude.com> On Dec 29, 2005, at 4:33 PM, Ruslan Zasukhin wrote: > On 12/29/05 11:27 PM, "Charles Yeomans" wrote: > > Hi Charles, > >> Uh, that would be VServer.RegisterDatabase > > Can you reproduce ? > > Although in 2.1 we have try improve a lots stability ... I don't know whether I can reproduce it; I think that I may have caused it myself. -------------- Charles Yeomans From sunshine at public.kherson.ua Thu Dec 29 23:46:03 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 15:47:10 2005 Subject: Ways => Styles // Won't Run Second Time In-Reply-To: Message-ID: On 12/29/05 10:35 PM, "Ed Kleban" wrote: Hi Chuck, Hi Ed, I have decide interrupt complex debugging and jump into this thread. Sorry for delay. >> We need BETTER and more thoroughly described examples. I've asked >> this on numerous occasions, but I get the distinct impression my >> requests to improve this system are falling on deaf ears. Chuck, one point. We was last 3 months in stage development of Windows products for Valentina 2, we have implement 60 * 3 = 180 examples total for VCOM, VNET and c++, For c++ we was need even make Visual and xcode projects Very hard work. Believe me. Let's hope that now, when we have establish practically complete set of API for Valentina 2 (move to WIDE), we will start again develop Valentina into DEEP. And I like that new products bring us new developers with new projects. Yesterday Kim (from beta list) was able surprise us with Ivan. We second day debug his project. :-) It seems I have almost resolve bug. This is VCOM developer. And Chuck, since you like API Style, note that Ed is your best friend. He also use API style for cool things. Ed is in V4RB, Chuck is on V4MD, right? >> Regards, >> >> Chuck > > LOL. I constantly give Ruslan and his crew all manner of grief on the > quality and content of their documentation. Interestingly however this is > one case where I disagree with your concern and in fact think they do a > rather excellent job of documenting the different "ways". My question above > regarding the use of the term "way" was a bit tongue in cheek and > rhetorical. As a concept I really like the various "way"s documented for > creating and accessing a V2 database. As a term, well usage of the term > "way" brings up all manner of grammatical problems and ambiguities as you've > just demonstrated. A better choice of term might have been "style" rather > than way. Great idea!!!! Ed! Hmm, I think we will START TO USE this term *STYLE* from this point. And then it needs correct all examples and docs to reflect this change. Ak. But this is worth to do this. > Whereas the documentation is fairly clear in terms of documenting the > differences among the different styles if you can get past the problems with > using the term "way", the Examples are simply excellent and indeed are > nicely sorted into separate folders by coding style. > > So my little jab at the way-meister is really a suggestion I guess that in > V3 or V4 it might be better to overhaul all of the documentation to use a > more intuitive and less problematic term such as "style" instead of "way". We will not wait for v3 ! > But it wouldn't be nearly as homey nor what I consider to be classic Ruslan > as usage of the current term way, which I've come to find very clear, very > distinctively Valentinsh. -- 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] From sunshine at public.kherson.ua Thu Dec 29 23:46:40 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 15:47:47 2005 Subject: problem opening remote database In-Reply-To: <5bf60c7399de147647ae2803ad149bff@desuetude.com> Message-ID: On 12/29/05 11:40 PM, "Charles Yeomans" wrote: >> Although in 2.1 we have try improve a lots stability ... > > I don't know whether I can reproduce it; I think that I may have caused > it myself. So now it works ok ? good -- 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] From yeomans at desuetude.com Thu Dec 29 16:54:10 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 15:55:14 2005 Subject: problem opening remote database In-Reply-To: <101488704.20051229230025@public.kherson.ua> References: <1409307741.20051229204916@public.kherson.ua> <7ec2576f1d7b6e3546b4af19b15339c4@desuetude.com> <101488704.20051229230025@public.kherson.ua> Message-ID: Even after replacing the corrupt files, I was still encountering the same problem -- I could open the database, but it had 0 tables. This problem I can reproduce, and it's interesting. Here is my code: dim newDB as new VDatabase(serverAddress, userName, password) dim dbFile as new FolderItem("timedatabase") newDB.Open dbFIle This looks like it should work, but it didn't. The problem turns out to lie with dbFile. When you create a new FolderItem in REALbasic like this, it assumes that the FolderItem is in the same directory as the application. In that directory, I had a folder called "TimeDatabase". So the result, dbFile, was a FolderItem pointing to that directory. I suspect that V4Rb looks at the FolderItem passed to Open, sees that it is a directory, and does something with that information. But of course "timedatabase" is not a directory on the server machine. Renaming that directory on my machine cured the problem, and I was able to get a working VDatabase object. It seems to me that the best solution is that VDatabase.Open should be overloaded to accept a String parameter for remote databases. Given that VDatabase already has different constructors for local v. remote, I don't think that overloading Open and Create would take us too far away from the goal of a single codebase for working with local and remote databases. -------------- Charles Yeomans From sunshine at public.kherson.ua Fri Dec 30 00:00:25 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 16:01:30 2005 Subject: problem opening remote database In-Reply-To: Message-ID: On 12/29/05 11:54 PM, "Charles Yeomans" wrote: > Even after replacing the corrupt files, I was still encountering the > same problem -- I could open the database, but it had 0 tables. This > problem I can reproduce, and it's interesting. > > Here is my code: > > dim newDB as new VDatabase(serverAddress, userName, password) > dim dbFile as new FolderItem("timedatabase") > newDB.Open dbFIle > > This looks like it should work, but it didn't. The problem turns out > to lie with dbFile. When you create a new FolderItem in REALbasic like > this, it assumes that the FolderItem is in the same directory as the > application. In that directory, I had a folder called "TimeDatabase". > So the result, dbFile, was a FolderItem pointing to that directory. I > suspect that V4Rb looks at the FolderItem passed to Open, sees that it > is a directory, and does something with that information. But of > course "timedatabase" is not a directory on the server machine. > Renaming that directory on my machine cured the problem, and I was able > to get a working VDatabase object. > > It seems to me that the best solution is that VDatabase.Open should be > overloaded to accept a String parameter for remote databases. Given > that VDatabase already has different constructors for local v. remote, > I don't think that overloading Open and Create would take us too far > away from the goal of a single codebase for working with local and > remote databases. I see problem and point, Charles. Well, it is possible on the other hand, correct somehow V4RB plugin itself, that it EXTRACT only file name, in case it get FolderItem that point to local file. We will try reproduce this and see then. -- Ivan, please add this into Mantis for V4RB. This is only V4RB issue -- 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] From cbpelto at pcisys.net Thu Dec 29 15:24:32 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 16:25:39 2005 Subject: Won't Run Second Time In-Reply-To: References: Message-ID: <484C9AB5-99E6-4234-A66E-7DF151E3015C@pcisys.net> On Dec 29, 2005, at 1:35 PM, Ed Kleban wrote: > > On 12/29/05 2:12 PM, "Chuck Pelto" wrote: > >> For example, there's the example of Single >> Table, which I'm using. Then there is the example in the tutorial, >> which is a completely different 'way'. >> >> The impression I got from Ruslan's answer was that the various 'ways' >> related to ways one could access the data once the database was >> established. > > I believe your impression is not an accurate one. Maybe. Maybe not. We'll try to get to the bottom of this...quickly. Time is running out. More on that later..... As I stated, I'm using CreateStructure approach in the example of the SINGLE TABLE... Project-level classes are: cDatabase as VDatabase tblTable1 as VTable tblTable2 as VTable App-level properties are: dbDatabase as cDatabase cDatabase-level properties are: dbDatabase as cDatabase dfTable1 as tblTable1 dfTable2 as tblTable2 cDatabase-level CreateStructure() code is: Sub CreateStructure(inStorageType as integer = 1) VDatabase(inStorageType) dfTable1 = new tblTable1(self) dfTable2 = new tblTable2(self) End Sub tblTable1-level properties are: field1 as VShort field2 as VString field3 as VVarChar field4 as VObjectPtr tblTable1-level tblTable1() code is: Sub tblTable1(inDatabase as cDatabase) dbDatabase = inDatabase Name = "Table" field1 = new VShort("tbl1_field1") field2 = new VString("tbl1_field2t", 50) field3 = new VVarChar("tbl1_field3", 2000) field4 = new VObjectPtr("tbl1_dftable2ptr", inDatabase.dfTable2, kSetNull) End Sub Table2 follows the same pattern.... App-level Open code is: Sub Open() dim rslt as boolean dim f as FolderItem #if DebugBuild // You can set it to 2 to use DCon Valentina.DebugLevel = EVDebugLevel.kLogParams #endif // init database kernel of Valentina Valentina.Init( 10 * 1024 * 1024 ) // Open the database dbDatabase = new cDatabase f = GetFolderItem("dbContacts.vdb") // If Database exists we open it, otherwise we create it. try dbDatabase.Open( f ) catch err as VException dbDatabase.Creator = "VALA" // optional dbDatabase.Create(f, EVDbMode.kDscDatBlbInd, 32 * 1024, EVOs.kOsDefault) dbDatabase.CreateStructure() end try End Sub As I said earlier, if the app creates a new database, because there is not one already in the folder with it, things work just fine. I can add/update/delete records in the database. I can confirm this, as far as the data is concerned, because the fields are populated when I look at the database file using VStudio. Looking at the values for the database and the tables, I see valid values for them after the Open() function is completed. However, if I quit and go back into the application and it opens the existing database, I can't access the data therein. All of the tables have 'nil' values for them, as Iook at the variables, after the Open () function is completed. I'm in a quandry as to why this is happening. It would seem to me that if the database worked fine once, it should work fine again afterwards. On the other hand, speaking of the various 'ways' databases are created, as I said, I used the example from SINGLE TABLE to go by. I was having entirely too much 'fun' trying to get the 'way' described in the tutorial to get a database operating in Valentina. There, instead of using the field2 = new VString("tbl1_field2t", 50) call, you use something that reads like this: call tblPerson.CreateVarCharField( "Name", 1022, EVFlag.fIndexed ) And, I agree, I think it's a misapprehension that there is only one way to create a database structure.... > So my little jab at the way-meister is really a suggestion I guess > that in > V3 or V4 it might be better to overhaul all of the documentation to > use a > more intuitive and less problematic term such as "style" instead of > "way". > But it wouldn't be nearly as homey nor what I consider to be > classic Ruslan > as usage of the current term way, which I've come to find very > clear, very > distinctively Valentinsh. My subscription expires in two months. At this point, unless I can get this resolved, I'm disinclined to renew it. We'll restructure the product so that it is a stand-alone operation and go with the database inside of REALbasic. Besides, they might decide to go multi- user with it after all. Regards, Chuck From sunshine at public.kherson.ua Fri Dec 30 00:45:44 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 16:46:48 2005 Subject: Won't Run Second Time In-Reply-To: <484C9AB5-99E6-4234-A66E-7DF151E3015C@pcisys.net> Message-ID: On 12/30/05 12:24 AM, "Chuck Pelto" wrote: > As I said earlier, if the app creates a new database, because there > is not one already in the folder with it, things work just fine. I > can add/update/delete records in the database. I can confirm this, as > far as the data is concerned, because the fields are populated when I > look at the database file using VStudio. Looking at the values for > the database and the tables, I see valid values for them after the > Open() function is completed. > > However, if I quit and go back into the application and it opens the > existing database, I can't access the data therein. All of the tables > have 'nil' values for them, as Iook at the variables, after the Open > () function is completed. Chuck, if you cannot find problem, then you can send your project to us. We will check it > I'm in a quandry as to why this is happening. It would seem to me > that if the database worked fine once, it should work fine again > afterwards. DO YOU CLOSE database in your app, when open it in Vstudio ? MAC OS X have danger problem: you can open the same file always by any app. this have come to linux. So you MUST close db in one app before open it in another. Are you doing this ? -- 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] From cbpelto at pcisys.net Thu Dec 29 15:47:12 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Thu Dec 29 16:48:17 2005 Subject: Ways => Styles // Won't Run Second Time In-Reply-To: References: Message-ID: On Dec 29, 2005, at 2:46 PM, Ruslan Zasukhin wrote: > On 12/29/05 10:35 PM, "Ed Kleban" wrote: > > Hi Chuck, > Hi Ed, > > I have decide interrupt complex debugging and jump into this thread. > Sorry for delay. > >>> We need BETTER and more thoroughly described examples. I've asked >>> this on numerous occasions, but I get the distinct impression my >>> requests to improve this system are falling on deaf ears. > > Chuck, one point. > > We was last 3 months in stage development of Windows products for > Valentina > 2, we have implement 60 * 3 = 180 examples total for VCOM, VNET > and c++, > For c++ we was need even make Visual and xcode projects > Very hard work. Believe me. It's ALL hard work. But if it's not communicated properly, it's not nearly as effective as it should be. Satisfied customers are a companies BEST advertisers. > And Chuck, since you like API Style, note that Ed is your best friend. > He also use API style for cool things. Ed is in V4RB, Chuck is on > V4MD, > right? Wrong. I'm V4RB. Regards, Chuck From yeomans at desuetude.com Thu Dec 29 17:51:50 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Thu Dec 29 16:52:57 2005 Subject: Won't Run Second Time In-Reply-To: <484C9AB5-99E6-4234-A66E-7DF151E3015C@pcisys.net> References: <484C9AB5-99E6-4234-A66E-7DF151E3015C@pcisys.net> Message-ID: <6e94879a566d4157ff0bffe677ad27f2@desuetude.com> I wonder if the problem isn't your use of dbDatabase.CreateStructure(). For subclasses of VDatabase, you build the database structure in the constructor. It looks like you call dbDatabase.CreateStructure() after creating the database, but not when the database is opened next time. Try eliminating the CreateStructure call from the App.Open code, and instead move it into cDatabase.Constructor. Charles Yeomans On Dec 29, 2005, at 5:24 PM, Chuck Pelto wrote: > > Maybe. Maybe not. We'll try to get to the bottom of this...quickly. > Time is running out. More on that later..... > > As I stated, I'm using CreateStructure approach in the example of the > SINGLE TABLE... > > Project-level classes are: > cDatabase as VDatabase > tblTable1 as VTable > tblTable2 as VTable > > App-level properties are: > dbDatabase as cDatabase > > cDatabase-level properties are: > dbDatabase as cDatabase > dfTable1 as tblTable1 > dfTable2 as tblTable2 > > cDatabase-level CreateStructure() code is: > > Sub CreateStructure(inStorageType as integer = 1) > > VDatabase(inStorageType) > > dfTable1 = new tblTable1(self) > dfTable2 = new tblTable2(self) > > End Sub > > tblTable1-level properties are: > field1 as VShort > field2 as VString > field3 as VVarChar > field4 as VObjectPtr > > tblTable1-level tblTable1() code is: > > Sub tblTable1(inDatabase as cDatabase) > > dbDatabase = inDatabase > > Name = "Table" > > field1 = new VShort("tbl1_field1") > field2 = new VString("tbl1_field2t", 50) > field3 = new VVarChar("tbl1_field3", 2000) > > field4 = new VObjectPtr("tbl1_dftable2ptr", inDatabase.dfTable2, > kSetNull) > > End Sub > > Table2 follows the same pattern.... > > App-level Open code is: > > Sub Open() > dim rslt as boolean > dim f as FolderItem > > #if DebugBuild > // You can set it to 2 to use DCon > Valentina.DebugLevel = EVDebugLevel.kLogParams > #endif > > // init database kernel of Valentina > Valentina.Init( 10 * 1024 * 1024 ) > // Open the database > > dbDatabase = new cDatabase > > f = GetFolderItem("dbContacts.vdb") > > // If Database exists we open it, otherwise we create it. > try > > dbDatabase.Open( f ) > > catch err as VException > > dbDatabase.Creator = "VALA" // optional > > dbDatabase.Create(f, EVDbMode.kDscDatBlbInd, 32 * 1024, > EVOs.kOsDefault) > > dbDatabase.CreateStructure() > > end try > > End Sub > > As I said earlier, if the app creates a new database, because there is > not one already in the folder with it, things work just fine. I can > add/update/delete records in the database. I can confirm this, as far > as the data is concerned, because the fields are populated when I look > at the database file using VStudio. Looking at the values for the > database and the tables, I see valid values for them after the Open() > function is completed. > > However, if I quit and go back into the application and it opens the > existing database, I can't access the data therein. All of the tables > have 'nil' values for them, as Iook at the variables, after the Open() > function is completed. > > I'm in a quandry as to why this is happening. It would seem to me that > if the database worked fine once, it should work fine again > afterwards. > > > On the other hand, speaking of the various 'ways' databases are > created, as I said, I used the example from SINGLE TABLE to go by. > > I was having entirely too much 'fun' trying to get the 'way' described > in the tutorial to get a database operating in Valentina. There, > instead of using the field2 = new VString("tbl1_field2t", 50) call, > you use something that reads like this: > > call tblPerson.CreateVarCharField( "Name", 1022, EVFlag.fIndexed ) > > And, I agree, I think it's a misapprehension that there is only one > way to create a database structure.... > >> So my little jab at the way-meister is really a suggestion I guess >> that in >> V3 or V4 it might be better to overhaul all of the documentation to >> use a >> more intuitive and less problematic term such as "style" instead of >> "way". >> But it wouldn't be nearly as homey nor what I consider to be classic >> Ruslan >> as usage of the current term way, which I've come to find very clear, >> very >> distinctively Valentinsh. > > My subscription expires in two months. At this point, unless I can get > this resolved, I'm disinclined to renew it. We'll restructure the > product so that it is a stand-alone operation and go with the database > inside of REALbasic. Besides, they might decide to go multi-user with > it after all. From sunshine at public.kherson.ua Fri Dec 30 01:34:21 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Thu Dec 29 17:35:26 2005 Subject: Won't Run Second Time In-Reply-To: <7D5BDCF4-24D9-46B3-A58C-27A5B8FE8217@pcisys.net> Message-ID: On 12/30/05 12:55 AM, "Chuck Pelto" wrote: Hi Chuck, Well, our project crashes on my side on FIRST call to db.open() So let's start watch your code. In App.open() you have dbContacts = new cDatabase And as far as I see you have made in project classes cDatabase, tblContacs, ... So I assume you want to use Class Style. Right ? ------------------- Okay, lets go to class cDatabase. O-ops. There is no constructor here! Instead you have CreateStructure() VDatabase(inStorageType) dfContacts = new tblContacts(self) dfForms = new tblForms(self) dfInformation = new tblInformation(self) dfSearchCriteria = new tblSearchCriteria(self) dfSearches = new tblSearches(self) end Chuck, but this is WRONG. * You have made function, but not constructor of class! * you have even call Vdatabase - parent constructor. It must be as Constructor() VDatabase(inStorageType) dfContacts = new tblContacts(self) dfForms = new tblForms(self) dfInformation = new tblInformation(self) dfSearchCriteria = new tblSearchCriteria(self) dfSearches = new tblSearches(self) end --------------------- Check, I will try cleanup your project now to make it work at least one start. And send you back. You need much more careful study examples. CreateStructure() -- this was from API Style. And in API style it looks as CreateStructure db.CreateTable( "Contacts" ) db.CreateTable( "Contacts" ) db.CreateTable( "Contacts" ) db.CreateTable( "Contacts" ) End You see difference ? -- 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] From Ed at Kleban.com Thu Dec 29 17:47:05 2005 From: Ed at Kleban.com (Ed Kleban) Date: Thu Dec 29 17:48:18 2005 Subject: Ways => Styles // Won't Run Second Time In-Reply-To: Message-ID: On 12/29/05 4:47 PM, "Chuck Pelto" wrote: > > On Dec 29, 2005, at 2:46 PM, Ruslan Zasukhin wrote: > >> On 12/29/05 10:35 PM, "Ed Kleban" wrote: >> >> Chuck, one point. >> >> We was last 3 months in stage development of Windows products for >> Valentina >> 2, we have implement 60 * 3 = 180 examples total for VCOM, VNET >> and c++, >> For c++ we was need even make Visual and xcode projects >> Very hard work. Believe me. > > It's ALL hard work. But if it's not communicated properly, it's not > nearly as effective as it should be. Satisfied customers are a > companies BEST advertisers. Yeah, the language barrier and lack of quality documentation is one I've discussed a lot with Ruslan and crew. They're certainly aware of it. And based on some of the recent improvements I've seen in the new Kernel and Reference manual making some good progress. But this is clearly the largest disincentive I can think of for using V2. Hopefully they will continue to improve. I'm sure their lack of progress on this front is by no means a result of a lack in desire to improve it. >> And Chuck, since you like API Style, note that Ed is your best friend. Not yet really, but I'm certainly willing to be :) >> He also use API style for cool things. LOL, if cool = "highly bizarre undocumented usage patterns to achieve phenomenal performance and drive Ruslan nuts", then yeah... I guess you could call it cool. >> Ed is in V4RB, Chuck is on >> V4MD, >> right? > > Wrong. I'm V4RB. > Well, if we're being picky about communication here, I believe it is correct to say that you Chuck, Charles, and I are all using the RB platform and thus the V4RB product version of Valentina. That said, the calls in the example code you sent show that you are using the "API way", or in new-speak the API style, and in fact are probably endeavoring to use a special case of the API style, which Ruslan refers to as the "Classes way" or what I'd call the "RB Class style". In any event, I believe Charles' suggestion is a good one and is indeed the kind of problem that I suspected might be the case with the type of code you're writing. There are some very important and very undocumented aspects about usage of the RB Class Style that require you to both place the code and ensure it gets executed in the EXACT same manner as the Classes way examples if you expect it to work, and indeed to properly associate the tables with the database... unless you truly understand the undocumented details of what it's doing behind the scenes and why. > Regards, > Chuck Let us know if we can try and help or hinder some more. --Ed From sunshine at public.kherson.ua Fri Dec 30 13:57:35 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 05:58:41 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: On 12/30/05 1:34 AM, "Ruslan Zasukhin" wrote: > Check, I will try cleanup your project now to make it work at least one > start. And send you back. Some mystery here. * when I have run tutorial project 2 hours ago, it did work. * after I have copy its code into your project -- not works * run tutorial again -- not works. Wow. I am debugging this. Chuck, at last of end, this can be solved in other way: simply use FolderItem.Exists method to see if db files exists on disk and then choose Create or Open. -- 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] From cbpelto at pcisys.net Fri Dec 30 09:19:18 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Fri Dec 30 10:20:25 2005 Subject: Won't Run Second Time In-Reply-To: <6e94879a566d4157ff0bffe677ad27f2@desuetude.com> References: <484C9AB5-99E6-4234-A66E-7DF151E3015C@pcisys.net> <6e94879a566d4157ff0bffe677ad27f2@desuetude.com> Message-ID: Morning Charles, On Dec 29, 2005, at 3:51 PM, Charles Yeomans wrote: > I wonder if the problem isn't your use of dbDatabase.CreateStructure > (). For subclasses of VDatabase, you build the database structure > in the constructor. It looks like you call > dbDatabase.CreateStructure() after creating the database, but not > when the database is opened next time. Try eliminating the > CreateStructure call from the App.Open code, and instead move it > into cDatabase.Constructor. Do we have to use a constructor during an Open call to an already existing database? I was understood that an existing and valid database structure would be recognized on .Open(). The dbDatabase.CreateStructure() is the Constructor() call in this app. I did that based on the Lesson1 example (see Window1 Methods). Moving that call to the Constructor will never have the Constructor called. I could be mistaken in my understanding of the Constructor(), but as I said, it was based on Lesson1. [Note: Another example of what Ed and I have been talking about regarding a need for better documentation.] Regards, Chuck From sunshine at public.kherson.ua Fri Dec 30 18:27:02 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 10:28:08 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: On 12/30/05 6:19 PM, "Chuck Pelto" wrote: >> I wonder if the problem isn't your use of dbDatabase.CreateStructure >> (). For subclasses of VDatabase, you build the database structure >> in the constructor. It looks like you call >> dbDatabase.CreateStructure() after creating the database, but not >> when the database is opened next time. Try eliminating the >> CreateStructure call from the App.Open code, and instead move it >> into cDatabase.Constructor. > > Do we have to use a constructor during an Open call to an already > existing database? I was understood that an existing and valid > database structure would be recognized on .Open(). mydb = new MyDatabase <- this call chain of constructors mydb.Open() > The dbDatabase.CreateStructure() is the Constructor() call in this > app. I did that based on the Lesson1 example (see Window1 Methods). Wrong. Lesson1 demonstrate API Style. You need to check folder Examples/Class_way > Moving that call to the Constructor will never have the Constructor > called. > > I could be mistaken in my understanding of the Constructor(), but as > I said, it was based on Lesson1. [Note: Another example of what Ed > and I have been talking about regarding a need for better > documentation.] -- 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] From yeomans at desuetude.com Fri Dec 30 11:39:13 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 10:40:19 2005 Subject: Won't Run Second Time In-Reply-To: References: <484C9AB5-99E6-4234-A66E-7DF151E3015C@pcisys.net> <6e94879a566d4157ff0bffe677ad27f2@desuetude.com> Message-ID: <7a7c61ca9d1a512a7ec61c30af443678@desuetude.com> On Dec 30, 2005, at 11:19 AM, Chuck Pelto wrote: > Morning Charles, > > On Dec 29, 2005, at 3:51 PM, Charles Yeomans wrote: > >> I wonder if the problem isn't your use of >> dbDatabase.CreateStructure(). For subclasses of VDatabase, you build >> the database structure in the constructor. It looks like you call >> dbDatabase.CreateStructure() after creating the database, but not >> when the database is opened next time. Try eliminating the >> CreateStructure call from the App.Open code, and instead move it into >> cDatabase.Constructor. > > Do we have to use a constructor during an Open call to an already > existing database? I was understood that an existing and valid > database structure would be recognized on .Open(). > > The dbDatabase.CreateStructure() is the Constructor() call in this > app. I did that based on the Lesson1 example (see Window1 Methods). > Moving that call to the Constructor will never have the Constructor > called. > > I could be mistaken in my understanding of the Constructor(), but as I > said, it was based on Lesson1. [Note: Another example of what Ed and I > have been talking about regarding a need for better documentation.] If you want to use a VDatabase subclass, then you need the constructor always. I confess that I have quit using that approach because of problems I encountered early in making the switch to v2. I've found that it is enough for me to use a VDatabase object plus the VDatabase.Table functions. I have a separate module in which I keep a method or two that creates the database structure. -------------- Charles Yeomans From sunshine at public.kherson.ua Fri Dec 30 19:10:24 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 11:11:31 2005 Subject: Won't Run Second Time In-Reply-To: <7a7c61ca9d1a512a7ec61c30af443678@desuetude.com> Message-ID: On 12/30/05 6:39 PM, "Charles Yeomans" wrote: Hi Charles, > If you want to use a VDatabase subclass, then you need the constructor > always. I confess that I have quit using that approach because of > problems I encountered early in making the switch to v2. I've found > that it is enough for me to use a VDatabase object plus the > VDatabase.Table functions. I have a separate module in which I keep a > method or two that creates the database structure. I.e. You use API Style, yes? Then this mans that you have in code db.Table( "name" ) tbl.Field( "name" ) Calls. Right ? Or you have made some pointers to objects ? -- 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] From yeomans at desuetude.com Fri Dec 30 12:16:38 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 11:17:45 2005 Subject: Won't Run Second Time In-Reply-To: References: Message-ID: <42401f2a6c3f6c430cc99eaf54ecca96@desuetude.com> On Dec 30, 2005, at 12:10 PM, Ruslan Zasukhin wrote: > On 12/30/05 6:39 PM, "Charles Yeomans" wrote: > > Hi Charles, > >> If you want to use a VDatabase subclass, then you need the constructor >> always. I confess that I have quit using that approach because of >> problems I encountered early in making the switch to v2. I've found >> that it is enough for me to use a VDatabase object plus the >> VDatabase.Table functions. I have a separate module in which I keep a >> method or two that creates the database structure. > > I.e. You use API Style, yes? > > Then this mans that you have in code > > db.Table( "name" ) > > tbl.Field( "name" ) > > Calls. Right ? Right. -------------- Charles Yeomans From Ed at Kleban.com Fri Dec 30 11:27:48 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 30 11:29:08 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: On 12/30/05 10:19 AM, "Chuck Pelto" wrote: > Morning Charles, > > On Dec 29, 2005, at 3:51 PM, Charles Yeomans wrote: > >> I wonder if the problem isn't your use of dbDatabase.CreateStructure >> (). For subclasses of VDatabase, you build the database structure >> in the constructor. It looks like you call >> dbDatabase.CreateStructure() after creating the database, but not >> when the database is opened next time. Try eliminating the >> CreateStructure call from the App.Open code, and instead move it >> into cDatabase.Constructor. > Do we have to use a constructor during an Open call to an already > existing database? I was understood that an existing and valid > database structure would be recognized on .Open(). I believe you may have confused the use of the term "constructor" here. The term constructor does not refer to a specific API call such as dbDatabase.CreateStructure(). The term refers to either a method named "constructor" or a method having the same name as the class in which it is contained. This method gets called when a new instance is created. The question at hand then, is what API calls does one need to put inside of a constructor... or somewhere else. > Do we have to use a constructor during an Open call to an already > existing database? This makes no sense to me. A question that would make sense to me is: "Do we have to use a Vdatabase.Open call inside of a constructor method to open an already existing database?" To which the answer is "Yes, if you want to use that database." > I was understood that an existing and valid > database structure would be recognized on .Open(). If you name the database in the Vdatabase.Open call, then yes it should successfully open it. > The dbDatabase.CreateStructure() is the Constructor() call in this > app. Again, that makes no sense to me based upon my understanding of the term "constructor" > I did that based on the Lesson1 example (see Window1 Methods). > Moving that call to the Constructor will never have the Constructor > called. I highly recommend you take one of the specific working examples in the examples folder, retain its structure, and modify the specific tables and fields that you need for your app. That will have a much greater liklihood of working than building from scratch based upon what you read in the tutorial. > I could be mistaken in my understanding of the Constructor(), but as > I said, it was based on Lesson1. [Note: Another example of what Ed > and I have been talking about regarding a need for better > documentation.] I happen to think that the examples serve as the best possible documentation available at this point. > Regards, > > Chuck Good luck! --Ed From sunshine at public.kherson.ua Fri Dec 30 19:32:14 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 11:33:19 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: On 12/30/05 7:27 PM, "Ed Kleban" wrote: >> I could be mistaken in my understanding of the Constructor(), but as >> I said, it was based on Lesson1. [Note: Another example of what Ed >> and I have been talking about regarding a need for better >> documentation.] > > I happen to think that the examples serve as the best possible documentation > available at this point. For info of list: Chuck already have get it working. Big step forward :-) -- 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] From Ed at Kleban.com Fri Dec 30 11:32:30 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 30 11:33:38 2005 Subject: Won't Run Second Time In-Reply-To: <7a7c61ca9d1a512a7ec61c30af443678@desuetude.com> Message-ID: On 12/30/05 10:39 AM, "Charles Yeomans" wrote: > > On Dec 30, 2005, at 11:19 AM, Chuck Pelto wrote: > >> Morning Charles, >> >> On Dec 29, 2005, at 3:51 PM, Charles Yeomans wrote: >> > If you want to use a VDatabase subclass, then you need the constructor > always. I confess that I have quit using that approach because of > problems I encountered early in making the switch to v2. I've found > that it is enough for me to use a VDatabase object plus the > VDatabase.Table functions. I have a separate module in which I keep a > method or two that creates the database structure. > > -------------- > Charles Yeomans > I on the other hand have absolutely no problem whatsoever in using the RB Class style and create my database in the exact manner as shown in the "Classes way" examples. I however had the benefit of using this code very late in the game after the V2 code was well established and quite stable. I've heard the complaint that Charles raises above from others regarding some horrible war stories in endeavoring to convert older V1 apps to use V2, at a time, I'm guessing, that the V2 code was far less stable. --Ed From yeomans at desuetude.com Fri Dec 30 12:38:38 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 11:39:44 2005 Subject: Won't Run Second Time In-Reply-To: References: Message-ID: <643549f950a2ddfbd2ee1b45a09db33f@desuetude.com> On Dec 30, 2005, at 12:32 PM, Ed Kleban wrote: > > > > On 12/30/05 10:39 AM, "Charles Yeomans" wrote: > >> >> On Dec 30, 2005, at 11:19 AM, Chuck Pelto wrote: >> >>> Morning Charles, >>> >>> On Dec 29, 2005, at 3:51 PM, Charles Yeomans wrote: >>> >> If you want to use a VDatabase subclass, then you need the constructor >> always. I confess that I have quit using that approach because of >> problems I encountered early in making the switch to v2. I've found >> that it is enough for me to use a VDatabase object plus the >> VDatabase.Table functions. I have a separate module in which I keep a >> method or two that creates the database structure. >> >> -------------- >> Charles Yeomans >> > > I on the other hand have absolutely no problem whatsoever in using the > RB > Class style and create my database in the exact manner as shown in the > "Classes way" examples. I however had the benefit of using this code > very > late in the game after the V2 code was well established and quite > stable. > I've heard the complaint that Charles raises above from others > regarding > some horrible war stories in endeavoring to convert older V1 apps to > use V2, > at a time, I'm guessing, that the V2 code was far less stable. > That would be a good guess. However, I find the so-called API approach easier while the database structure remains in flux. -------------- Charles Yeomans From leo.hoedemaker at gmx.de Fri Dec 30 18:39:08 2005 From: leo.hoedemaker at gmx.de (Leo Hoedemaker) Date: Fri Dec 30 11:40:14 2005 Subject: Question about index structures Message-ID: <6397.1135964348@www71.gmx.net> Does Paradigmasoft plan to add new index structures in the future or will there be a possibility to add new index styles for developers? I'm especially interested in support for R-trees or R+-trees to index spatial data. Cheers, Leo -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie From sunshine at public.kherson.ua Fri Dec 30 19:49:34 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 11:50:39 2005 Subject: Question about index structures In-Reply-To: <6397.1135964348@www71.gmx.net> Message-ID: On 12/30/05 7:39 PM, "Leo Hoedemaker" wrote: Hi Leo, > Does Paradigmasoft plan to add new index structures in the future or will > there be a possibility to add new index styles for developers? I'm > especially interested in support for R-trees or R+-trees to index spatial > data. Yes we also would like to add new indexes. As many as possible. IF you are C++ developer then you can IMPLEMENT our I_Index interface to do that. So if you are C++ developer we can go more deep on this with you. -- 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] From sunshine at public.kherson.ua Fri Dec 30 19:52:00 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 11:53:06 2005 Subject: Won't Run Second Time In-Reply-To: <643549f950a2ddfbd2ee1b45a09db33f@desuetude.com> Message-ID: On 12/30/05 7:38 PM, "Charles Yeomans" wrote: >> I on the other hand have absolutely no problem whatsoever in using the >> RB >> Class style and create my database in the exact manner as shown in the >> "Classes way" examples. I however had the benefit of using this code >> very >> late in the game after the V2 code was well established and quite >> stable. >> I've heard the complaint that Charles raises above from others >> regarding >> some horrible war stories in endeavoring to convert older V1 apps to >> use V2, >> at a time, I'm guessing, that the V2 code was far less stable. >> > > That would be a good guess. However, I find the so-called API approach > easier while the database structure remains in flux. This is correct. Class Style must be used when db structure if FIXED. You Ed, now on early stage of development now, so you just create new db each time if you change something. Will come time when you will FIX that. After that (and if you have ship to end-users) you will need do much more careful steps to change structure of EXISTED dbs. On the other hand API Style also require from developer write code to CHANGE structure of db if needed. -- 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] From yeomans at desuetude.com Fri Dec 30 13:00:45 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 12:01:52 2005 Subject: [V4Rb] Encoding glitch Message-ID: <7c0af3685d250b39d446bcb658bacc88@desuetude.com> I'm seeing a small problem with text encodings in V4Rb 2.0.5. I'm importing some records into a Valentina database. The text is MacRoman-encoded and contains curly apostrophes; these apostrophes are lost when I assign the text to a VField. In particular, if I execute the following code c.TextField("description").Value = "Valentina?s" dim foo as String = c.TextField("description").Value where the string "Valentina?s" is MacRoman-encoded, foo is set to "Valentinas". If I first convert the encoding of "Valentina?s" to UTF-8, then there are no problems. -------------- Charles Yeomans From Ed at Kleban.com Fri Dec 30 12:01:13 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 30 12:02:23 2005 Subject: Won't Run Second Time In-Reply-To: <643549f950a2ddfbd2ee1b45a09db33f@desuetude.com> Message-ID: On 12/30/05 11:38 AM, "Charles Yeomans" wrote: > > On Dec 30, 2005, at 12:32 PM, Ed Kleban wrote: > >> On 12/30/05 10:39 AM, "Charles Yeomans" wrote: >> >> I on the other hand have absolutely no problem whatsoever in using the >> RB >> Class style and create my database in the exact manner as shown in the >> "Classes way" examples. I however had the benefit of using this code >> very >> late in the game after the V2 code was well established and quite >> stable. >> I've heard the complaint that Charles raises above from others >> regarding >> some horrible war stories in endeavoring to convert older V1 apps to >> use V2, >> at a time, I'm guessing, that the V2 code was far less stable. >> > > That would be a good guess. However, I find the so-called API approach > easier while the database structure remains in flux. > Yeah, I can see that. There would definitely be benefits to having all of the field, record, and structure declarations all in one or fewer places rather than strewn out among all the various class constructors. However, I use this distributed, Object-oriented structure to good advantage and have all sorts of other bizarre new types of things like "FieldCursors" which are more conveniently defined and managed within the context of the class hierarchy. But it's great to have options, and in the case of Valentina you can mix and match as desired to get an organization that is most appropriate for your code (as long as you really know what you're doing and are aware of several undocumented features about how V2 establishes internal links among databases, tables, and fields) -- which is one of the reasons I like V2 so much. --Ed From leo.hoedemaker at gmx.de Fri Dec 30 19:06:13 2005 From: leo.hoedemaker at gmx.de (Leo Hoedemaker) Date: Fri Dec 30 12:07:19 2005 Subject: Question about index structures References: Message-ID: <10579.1135965973@www71.gmx.net> Hi Ruslan, thank you for your quick reply. > Yes we also would like to add new indexes. As many as possible. Ok, this is good news. Is this something which is planed in the near future, i.e. Valentina 2.x, oder do we have to wait until Valentina 3 or later? > IF you are C++ developer then you can IMPLEMENT our I_Index interface to > do that. Unfortunately, at the moment I use V4RB. Cheers, Leo -- DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert: GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl From Ed at Kleban.com Fri Dec 30 12:07:32 2005 From: Ed at Kleban.com (Ed Kleban) Date: Fri Dec 30 12:08:46 2005 Subject: Won't Run Second Time In-Reply-To: Message-ID: On 12/30/05 11:52 AM, "Ruslan Zasukhin" wrote: > On 12/30/05 7:38 PM, "Charles Yeomans" wrote: > >> That would be a good guess. However, I find the so-called API approach >> easier while the database structure remains in flux. > > This is correct. > > Class Style must be used when db structure if FIXED. > > > You Ed, now on early stage of development now, so you just create new db > each time if you change something. Will come time when you will FIX that. > > After that (and if you have ship to end-users) you will need do much more > careful steps to change structure of EXISTED dbs. > > On the other hand API Style also require from developer write code to CHANGE > structure of db if needed. > Good point. I'll have to give this some thought. Thanks! --Ed From sunshine at public.kherson.ua Fri Dec 30 20:14:18 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 12:15:24 2005 Subject: Question about index structures In-Reply-To: <10579.1135965973@www71.gmx.net> Message-ID: On 12/30/05 8:06 PM, "Leo Hoedemaker" wrote: Hi Leo, > thank you for your quick reply. > >> Yes we also would like to add new indexes. As many as possible. > > Ok, this is good news. Is this something which is planed in the near > future, i.e. Valentina 2.x, oder do we have to wait until Valentina 3 or > later? >> IF you are C++ developer then you can IMPLEMENT our I_Index interface to >> do that. > > Unfortunately, at the moment I use V4RB. Then you cannot add them self. Why you need R-trees or R+-trees indexes ? Please describe your task and vision -- 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] From sunshine at public.kherson.ua Fri Dec 30 20:54:03 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 12:55:09 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: <7c0af3685d250b39d446bcb658bacc88@desuetude.com> Message-ID: On 12/30/05 8:00 PM, "Charles Yeomans" wrote: > I'm seeing a small problem with text encodings in V4Rb 2.0.5. I'm > importing some records into a Valentina database. The text is > MacRoman-encoded and contains curly apostrophes; these apostrophes are > lost when I assign the text to a VField. In particular, if I execute > the following code > > c.TextField("description").Value = "Valentina?s" > dim foo as String = c.TextField("description").Value > > where the string "Valentina?s" is MacRoman-encoded, foo is set to > "Valentinas". > > If I first convert the encoding of "Valentina?s" to UTF-8, then there > are no problems. But all right then, Charles. You need give to V4RB the UTF8 strings. It wait for UTF8, if you give something else, why it should work ? -- 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] From leo.hoedemaker at gmx.de Fri Dec 30 20:01:09 2005 From: leo.hoedemaker at gmx.de (Leo Hoedemaker) Date: Fri Dec 30 13:02:15 2005 Subject: Question about index structures References: Message-ID: <15505.1135969269@www71.gmx.net> Hi Ruslan, > Why you need R-trees or R+-trees indexes ? > Please describe your task and vision I would like to use R-trees for indexing spatial data (points, lines polygons etc). Personally, I'm in the process of planning some kind of GIS (geographical Information System) for storing animal distribution data. However, spatial data is also used for e.g. CAD or computer vision. Basically, I would like to be able to store and retrieve spatial objects and get information like "find all points within a certain area" or "find all stored objects within 2 km of location x" Since most GIS programs store huge amounts of data, it would be very impractical to retrieve all data and peform a search, which would take ages. Therefor I would like to index my spatial data first. As far as I know, the most efficient way to index spatial objects is using some variety of R-trees (like the recently described Priority R-tree (Arge et al., 2004)). Regards, Leo -- DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert: GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl From yeomans at desuetude.com Fri Dec 30 15:03:58 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 14:05:04 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: References: Message-ID: <46ea609e2bfe1a239931295440efe763@desuetude.com> On Dec 30, 2005, at 1:54 PM, Ruslan Zasukhin wrote: > On 12/30/05 8:00 PM, "Charles Yeomans" wrote: > >> I'm seeing a small problem with text encodings in V4Rb 2.0.5. I'm >> importing some records into a Valentina database. The text is >> MacRoman-encoded and contains curly apostrophes; these apostrophes are >> lost when I assign the text to a VField. In particular, if I execute >> the following code >> >> c.TextField("description").Value = "Valentina?s" >> dim foo as String = c.TextField("description").Value >> >> where the string "Valentina?s" is MacRoman-encoded, foo is set to >> "Valentinas". >> >> If I first convert the encoding of "Valentina?s" to UTF-8, then there >> are no problems. > > But all right then, Charles. > > You need give to V4RB the UTF8 strings. > > It wait for UTF8, if you give something else, why it should work ? Because that's the way REALbasic is designed. It is the responsibility of the called method to handle string encodings. -------------- Charles Yeomans From yeomans at desuetude.com Fri Dec 30 16:15:49 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 15:16:56 2005 Subject: [V4Rb] VCursor.UpdateAllRecords problem Message-ID: <2df6ad8db5c12d67f0831e924afe4f09@desuetude.com> Does VCursor.UpdateAllRecords not work for remote databases? I've got some code that works for local databases, but not for remote databases, and UpdateAllRecords appears to be the problem. -------------- Charles Yeomans From sunshine at public.kherson.ua Fri Dec 30 23:57:20 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 15:58:25 2005 Subject: Question about index structures In-Reply-To: <15505.1135969269@www71.gmx.net> Message-ID: On 12/30/05 9:01 PM, "Leo Hoedemaker" wrote: Hi Leo, >> Why you need R-trees or R+-trees indexes ? >> Please describe your task and vision > > I would like to use R-trees for indexing spatial data (points, lines > polygons etc). Personally, I'm in the process of planning some kind of GIS > (geographical Information System) for storing animal distribution data. > > However, spatial data is also used for e.g. CAD or computer vision. Yes right. Okay so you have correct expectations :-) Please add this feature request into Mantis. > Basically, I would like to be able to store and retrieve spatial objects > and get information like "find all points within a certain area" or "find > all stored objects within 2 km of location x" I see. > Since most GIS programs store huge amounts of data, it would be very > impractical to retrieve all data and peform a search, which would take > ages. Therefor I would like to index my spatial data first. > > As far as I know, the most efficient way to index spatial objects is using > some variety of R-trees (like the recently described Priority R-tree (Arge > et al., 2004)). Yes this is true. You are first who ask about this kind of index. :-) I cannot estimate right now timeline of this. I need refresh my memory on how this index looks then I will decide how hard todo this feature. -- 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] From sunshine at public.kherson.ua Fri Dec 30 23:58:41 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 15:59:46 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: <46ea609e2bfe1a239931295440efe763@desuetude.com> Message-ID: On 12/30/05 10:03 PM, "Charles Yeomans" wrote: >>> If I first convert the encoding of "Valentina?s" to UTF-8, then there >>> are no problems. >> >> But all right then, Charles. >> >> You need give to V4RB the UTF8 strings. >> >> It wait for UTF8, if you give something else, why it should work ? > > Because that's the way REALbasic is designed. It is the responsibility > of the called method to handle string encodings. In general right. But we avoid test each string on its encoding. The solution will be (for 2.2 I think) usage of IOEncoding. Which you can switch and then send/get strings in that encoding you have specify. -- 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] From sunshine at public.kherson.ua Fri Dec 30 23:59:31 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Fri Dec 30 16:00:40 2005 Subject: [V4Rb] VCursor.UpdateAllRecords problem In-Reply-To: <2df6ad8db5c12d67f0831e924afe4f09@desuetude.com> Message-ID: On 12/30/05 11:15 PM, "Charles Yeomans" wrote: > Does VCursor.UpdateAllRecords not work for remote databases? I've got > some code that works for local databases, but not for remote databases, > and UpdateAllRecords appears to be the problem. On idea, it should work. Ivan, please check and give answer -- 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] From yeomans at desuetude.com Fri Dec 30 17:11:12 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 16:12:19 2005 Subject: [V4Rb] VCursor.UpdateAllRecords problem In-Reply-To: References: Message-ID: <3dc34f37e9e6f61a50f159041440f216@desuetude.com> On Dec 30, 2005, at 4:59 PM, Ruslan Zasukhin wrote: > On 12/30/05 11:15 PM, "Charles Yeomans" wrote: > >> Does VCursor.UpdateAllRecords not work for remote databases? I've got >> some code that works for local databases, but not for remote >> databases, >> and UpdateAllRecords appears to be the problem. > > On idea, it should work. > > Ivan, please check and give answer I rewrote my code to use UpdateRecord and a loop, and that worked. So I think UpdateAllRecords is the problem. -------------- Charles Yeomans From yeomans at desuetude.com Fri Dec 30 17:17:08 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 16:18:15 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: References: Message-ID: On Dec 30, 2005, at 4:58 PM, Ruslan Zasukhin wrote: > On 12/30/05 10:03 PM, "Charles Yeomans" wrote: > >>>> If I first convert the encoding of "Valentina?s" to UTF-8, then >>>> there >>>> are no problems. >>> >>> But all right then, Charles. >>> >>> You need give to V4RB the UTF8 strings. >>> >>> It wait for UTF8, if you give something else, why it should work ? >> >> Because that's the way REALbasic is designed. It is the responsibility >> of the called method to handle string encodings. > > In general right. > > But we avoid test each string on its encoding. You also avoided documenting this, which cost me some hours of time. > > The solution will be (for 2.2 I think) usage of IOEncoding. > > Which you can switch and then send/get strings in that encoding you > have > specify. I think this is a mistake -- depending on what you have in mind for IOEncoding -- either you should test for encodings and fit in with REALbasic, or you should document that V4Rb expects all strings to be UTF-8. -------------- Charles Yeomans From jda at his.com Fri Dec 30 17:27:49 2005 From: jda at his.com (jda) Date: Fri Dec 30 16:28:59 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: References: Message-ID: > >I think this is a mistake -- depending on what you have in mind for >IOEncoding -- either you should test for encodings and fit in with >REALbasic, or you should document that V4Rb expects all strings to >be UTF-8. > As for me, I'd just as soon have Valentina expect one encoding (settable, presumably in the IOEncoding preference) to avoid the overhead of checking with each transaction. With the latest improvements in fc2 I've come to realize that string handling in Valentina is one of the bottlenecks in my app (not the worst one, but it has a noticeable effect on performance). Jon From yeomans at desuetude.com Fri Dec 30 17:54:10 2005 From: yeomans at desuetude.com (Charles Yeomans) Date: Fri Dec 30 16:55:17 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: References: Message-ID: <7430aa7760cc8b0c1b48fa4adf825df4@desuetude.com> On Dec 30, 2005, at 5:27 PM, jda wrote: >> >> I think this is a mistake -- depending on what you have in mind for >> IOEncoding -- either you should test for encodings and fit in with >> REALbasic, or you should document that V4Rb expects all strings to be >> UTF-8. >> > > As for me, I'd just as soon have Valentina expect one encoding > (settable, presumably in the IOEncoding preference) to avoid the > overhead of checking with each transaction. With the latest > improvements in fc2 I've come to realize that string handling in > Valentina is one of the bottlenecks in my app (not the worst one, but > it has a noticeable effect on performance). I don't see how it can be avoided as long as Valentina uses UTF-16 and REALbasic uses UTF-8. When support is added for UTF-8 storage, as I believe is the case, the overhead of encoding conversion can be eliminated. As for checking encodings, my experience is that checking the encoding doesn't cost too much; at the plugin level, it is a function call plus integer comparison. -------------- Charles Yeomans From leo.hoedemaker at gmx.de Sat Dec 31 00:41:46 2005 From: leo.hoedemaker at gmx.de (Leo Hoedemaker) Date: Fri Dec 30 17:42:53 2005 Subject: Question about index structures References: Message-ID: <11289.1135986106@www94.gmx.net> Hi Ruslan, > Okay so you have correct expectations :-) > Please add this feature request into Mantis. Done! > You are first who ask about this kind of index. :-) > I cannot estimate right now timeline of this. > I need refresh my memory on how this index looks then I will decide how > hard todo this feature. There is lots of information about this on the internet. Maybe these links can help to refresh your memory ;-) http://archive.cs.uu.nl/pub/RUU/CS/techreps/CS-2004/2004-022.pdf http://postgis.refractions.net/ cheers, Leo -- 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail +++ GMX - die erste Adresse für Mail, Message, More +++ From sunshine at public.kherson.ua Sat Dec 31 12:47:16 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 31 04:48:24 2005 Subject: [V4Rb] VCursor.UpdateAllRecords problem In-Reply-To: <3dc34f37e9e6f61a50f159041440f216@desuetude.com> Message-ID: On 12/31/05 12:11 AM, "Charles Yeomans" wrote: >> Ivan, please check and give answer > > I rewrote my code to use UpdateRecord and a loop, and that worked. So > I think UpdateAllRecords is the problem. I suggest use instead SQlExecute( "UPDATE .. WHERE " ) Single command to server do what you need. No cursor at all. -- 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] From sunshine at public.kherson.ua Sat Dec 31 12:49:32 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 31 04:50:40 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: Message-ID: On 12/31/05 12:27 AM, "jda" wrote: >> I think this is a mistake -- depending on what you have in mind for >> IOEncoding -- either you should test for encodings and fit in with >> REALbasic, or you should document that V4Rb expects all strings to >> be UTF-8. >> > > As for me, I'd just as soon have Valentina expect one encoding > (settable, presumably in the IOEncoding preference) to avoid the > overhead of checking with each transaction. With the latest > improvements in fc2 I've come to realize that string handling in > Valentina is one of the bottlenecks in my app (not the worst one, but > it has a noticeable effect on performance). Jon, you mean that you still have some performance problem with fc2? Or you mean that before fc2 speedup have show bottleneck ? -- 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] From sunshine at public.kherson.ua Sat Dec 31 12:54:04 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 31 04:55:12 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: <7430aa7760cc8b0c1b48fa4adf825df4@desuetude.com> Message-ID: On 12/31/05 12:54 AM, "Charles Yeomans" wrote: >> As for me, I'd just as soon have Valentina expect one encoding >> (settable, presumably in the IOEncoding preference) to avoid the >> overhead of checking with each transaction. With the latest >> improvements in fc2 I've come to realize that string handling in >> Valentina is one of the bottlenecks in my app (not the worst one, but >> it has a noticeable effect on performance). > > I don't see how it can be avoided as long as Valentina uses UTF-16 and > REALbasic uses UTF-8. When support is added for UTF-8 storage, as I > believe is the case, the overhead of encoding conversion can be > eliminated. In fact conversion from UTF8 to UTF16 is only 1% of time as profiler show. > As for checking encodings, my experience is that checking the encoding > doesn't cost too much; at the plugin level, it is a function call plus > integer comparison. Right. We will try improve things in this area. Btw, I believe on lists many times was told that V4RB wait only UTF8 strings from RB now. -- 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] From sunshine at public.kherson.ua Sat Dec 31 12:55:59 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 31 04:57:07 2005 Subject: Question about index structures In-Reply-To: <11289.1135986106@www94.gmx.net> Message-ID: On 12/31/05 1:41 AM, "Leo Hoedemaker" wrote: >> Okay so you have correct expectations :-) >> Please add this feature request into Mantis. > > Done! > >> You are first who ask about this kind of index. :-) >> I cannot estimate right now timeline of this. >> I need refresh my memory on how this index looks then I will decide how >> hard todo this feature. > > There is lots of information about this on the internet. Maybe these links > can help to refresh your memory ;-) > > http://archive.cs.uu.nl/pub/RUU/CS/techreps/CS-2004/2004-022.pdf > http://postgis.refractions.net/ :-) thank you. Also I have some books, and sources of some dbs which have this feature... -- 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] From jda at his.com Sat Dec 31 09:03:31 2005 From: jda at his.com (jda) Date: Sat Dec 31 08:04:39 2005 Subject: [V4Rb] Encoding glitch In-Reply-To: References: Message-ID: > > >Jon, you mean that you still have some performance problem with fc2? > >Or you mean that before fc2 speedup have show bottleneck ? > The second -- fc2 was significantly faster for me retrieving strings from a cursor. Jon From sunshine at public.kherson.ua Sat Dec 31 22:18:09 2005 From: sunshine at public.kherson.ua (Ruslan Zasukhin) Date: Sat Dec 31 14:19:28 2005 Subject: [OT] Happy New Year to ALL ! Message-ID: Hi All, Paradigma team wish Happy New Year to all !!! Let new Year bring to all your many nice moments, implementations of dreams, new creative ideas, happy eyes of your children and lovers! -- 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] From Ed at Kleban.com Sat Dec 31 15:10:11 2005 From: Ed at Kleban.com (Ed Kleban) Date: Sat Dec 31 15:11:21 2005 Subject: [OT] Happy New Year to ALL ! In-Reply-To: Message-ID: On 12/31/05 2:18 PM, "Ruslan Zasukhin" wrote: > Hi All, > > Paradigma team wish Happy New Year to all !!! > > Let new Year bring to all your many nice moments, implementations of dreams, > new creative ideas, happy eyes of your children and lovers! > Thanks Ruslan You realize of course that your best wishes for "new creative ideas, and implementation of dreams" by us is going to end up requiring a heck of a lot more grief, confusion, and hard work on your team in 2006, right? But then I don't suppose either you or us would have it any other way. Best wishes to the Paragigma team for a great 2006. If it's just half as fun as the last few months of 2005 have been using Valentina, I'm sure we'll both have a ball! --Ed From cbpelto at pcisys.net Sat Dec 31 16:36:59 2005 From: cbpelto at pcisys.net (Chuck Pelto) Date: Sat Dec 31 17:38:10 2005 Subject: [OT] Happy New Year to ALL ! In-Reply-To: References: Message-ID: <60CE04E2-6544-4503-951A-13E664641CC8@pcisys.net> On Dec 31, 2005, at 2:10 PM, Ed Kleban wrote: > > > > On 12/31/05 2:18 PM, "Ruslan Zasukhin" > wrote: > >> Hi All, >> >> Paradigma team wish Happy New Year to all !!! >> >> Let new Year bring to all your many nice moments, implementations >> of dreams, >> new creative ideas, happy eyes of your children and lovers! >> > > Thanks Ruslan > > You realize of course that your best wishes for "new creative > ideas, and > implementation of dreams" by us is going to end up requiring a heck > of a lot > more grief, confusion, and hard work on your team in 2006, right? > > But then I don't suppose either you or us would have it any other way. > > Best wishes to the Paragigma team for a great 2006. If it's just > half as > fun as the last few months of 2005 have been using Valentina, I'm > sure we'll > both have a ball! > > --Ed And God Bless us....Everyone. Regards, Chuck(le)