#1  
Old 13th June 2020, 02:46 AM
AndyPhotoBell AndyPhotoBell is offline
Junior Member
 
Join Date: May 2020
Posts: 4
Default FindKey - weird error

Hi

C++ Builder 2007 + NexusDB 3.09

I have a simple table with a WideString field and an int32 field, both of which are in an index.

I want to use FindKey to find a record so I use this syntax:

TVarRec vr = (path, map);
Paths->FindKey(&vr, 1);

(path is a WideString and map is an int. Both have valid values).

The call to FindKey always fails with the message 'Invalid Value for Field DriveMap'.

If I change my code to use SetRangeStart() (etc) with the same values it works ok.

If I change my WideString search variable to a regular AnsiString then the call to FindKey succeeds. So it looks to me that there's a bug either in Nexus v3.09 or in C++ Builder 2007 (or both) with using FindKey (and the other Find... functions) when one of the parameters is a WideString.

Other than giving up on the Find functions, does anyone know a way to make this work?

Andy
  #2  
Old 13th June 2020, 01:51 PM
Eivind Bakkestuen
 
Posts: n/a
Default Re: FindKey - weird error

> Invalid Value

It's possible the error is raised in
TnxIndexDataSet.idRefIndexSetFields, in unit nxdb.pas.

It indicates either a problem with the array passed in, or the type
used in the variant record. There are several types available for
strings; check type you are using against the types supported in the
method above.

--

Eivind [NX]


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird error message Ole Willy Tuv nexusdb.public.support.sql 1 10th August 2006 12:20 AM
Weird Query Error Surjanto Binaries 0 12th April 2005 07:53 PM
Weird error when autoinc field has value of -1 Nathan Sutcliffe nexusdb.public.support.sql 4 1st April 2004 02:59 PM
Weird error when autoinc field has value of -1 Nathan Sutcliffe Binaries 0 31st March 2004 12:33 PM
Weird 15465 error... Tor Tveitane nexusdb.public.support 3 10th December 2003 08:33 PM


All times are GMT +11. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.