Concatinating numbers

Ruslan Zasukhin sunshine at public.kherson.ua
Tue May 25 18:39:30 CDT 2004


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
-------------------------------------------------------------



More information about the Valentina mailing list