Concatinating numbers

keatk at comcast.net keatk at comcast.net
Tue May 25 16:26:30 CDT 2004


> Hmm,
> 
> If you use RecID and ObjectPtr I think you never
> need this trick of RDB world.

Yes you do I think....

This is for storing test results on single vial which of a specific lot that has no intrinsinc identifier and replicate results from need to be grouped by product vial so that statistics (inter - and intra-vial variability) be calculated. (too bad you don't include Standard Deviation and Relative Standard Deviation in your summary functions... it would be very handy!

3 (or more) vials are tested and three (or more) repeats of the test are done on each vial A sample is defined as a single prduct vial and must have unique identifier. here it is a combination of Lot, Test, and a replicate number (actually abit more complex)

I have the follwing tables (this is actually simplified a good bit)

Lot: Info about the Lot/batch of material
Test : Info about the Test (Like who did it. when it started, current status etc)

TestSample:: defines a single vial of the producted used in that specific test
Result: Numeric result of a single deterimination from the test



TestSample is defined ( in part - actually there is one other field involved defining how the sample was prepared) as:

TestPtr as VObjectPtr
LotPtr as VObjectPtr
VialRep as VByte   and orbitray 1,2,3 etc  definining the order that the sample was 
                            prepared and  assigned by the Analyst
UniqueSampleKey as VVarChar = TestPtr +","+ LotPt+"," + VialRep

Result table is defined as :
SamplePtr as VObjectPointer
Value as VDouble
etc...


- Karen






> On 5/25/04 6:28 PM, "keatk at comcast.net" <keatk at comcast.net> wrote:
> 
> > I have a table where the primary key nned combination of several fields
> > VobjectPointer fields and another integer (VByte) value...
> 
> Hmm,
> 
> If you use RecID and ObjectPtr I think you never
> need this trick of RDB world.
> 
> 
> > I want to create a virtual field via a field method that is composed of all
> > those values and set it to kV_Unique...
> > 
> > What is the best way?
> > 
> > The obvious way is to convert all of them to stings and concatenate the
> > strings... but looking at the VAlentina SQL reference I don't see an SQL
> > function that converts numbers to strings equivalent to the RB. Str function..
> > Am I just missing it? If so what is it?
> 
> No need for such function, just send numeric field into place,
> And Valentina self will convert it to string.
> 
> > Is there a better way to do this?
> 
> If you want more than 8 bytes together then you need strings.
> 
> I still do not understand why you need this
> 
> > Also in V4RB  if one uses a baseobject method is there any error mesages if
> > and AddRecord failes because a field is not unique? BaseObject.GetRecID does
> > not *ALWAYS*  return 0 in my tests when one tries to add a duplicate.
> 
> If you will try add not unique record, then Valentina will refuse and return
> you 344 code.
> 
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
> 
> To subscribe to the Valentina mail list go to:
> http://lists.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina


More information about the Valentina mailing list