🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1257

Re: Table->Locate in > 1 fields

#1257
From: CyberNIK
Date: Thu, 30 Dec 1999 00:00
46 lines
1743 bytes
Ingo Sigl wrote in message <386B726A.60020506@online.de>...
>
>I use the Table->locate method for the search in more than one fields.
>The search in one field is ok with
>
>String test;
>
>Table->Locate("Company", test, Opts);
>
>
>But the search in more than one fields is not functionating. I always
>get the
>result "false" also if the datarecord exists. The code ist the same like
>in the help
>example:
>
>
>TLocateOptions Opts;
>Opts.Clear();
>Opts << loPartialKey;
>Variant locvalues[2];
>
>String test, test1;
>
>locvalues[0] = Variant(test0);
>locvalues[1] = Variant(test1);
>CustTable->Locate("Company;Contact", VarArrayOf(locvalues, 1), Opts);
>
>
>What is wrong with the function in C++??? In Delphi itworks quite well.
>
>Many thanx for any help!!!
>


Hi!

Code such this caused my server part of multi-tier application to crash.
Sometiems it works fine (!), sometimes not. I mentioned that problem
is in invocation of VarArrayOf(...). Instead of it I tried to use
VarArrayCreate and than fill this array.

I would use filtering with the same conditions in your example.

CyberNIK
Technical Details
Message-ID: <84ghbc$mdl2@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <386B726A.60020506@online.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,d388a424ed6a27cf
X-Google-Attributes: gidfcd2b,public
From: "CyberNIK" <ncs@mail.saratov.ru>
Subject: Re: Table->Locate in > 1 fields
Date: 1999/12/30
Message-ID: <84ghbc$mdl2@forums.borland.com>
X-Deja-AN: 566635115
Content-Transfer-Encoding: 7bit
References: <386B726A.60020506@online.de>
Content-Type: text/plain; charset="windows-1251"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.multi-tier