Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using TDataset.Locate with one value

4 views
Skip to first unread message

Frank Burleigh

unread,
May 31, 2008, 1:11:47 AM5/31/08
to
My real problem is that I don't know how to work with variant arrays:

v:variant;

Always fails with "Error creating variant or safe array,"
v:=VarArrayCreate( [0,1], varString );

but this is ok:
v:=VarArrayCreate( [0,1], varVariant );

So then I do:

V[0]:=mystring;
mydataset.Locate( 'Lastname', V, [] );

only to get "could not convert variant of type (array variant) into type
(string)."

The help text (in RAD 2007 Arch) is unhelpful; following it produces
about the same troubles. It's example text is too specific and doesn't
show a variety of scenarios.

I'd appreciate a nudge back on track. Thank you!

Mike Shkolnik

unread,
May 31, 2008, 5:42:34 AM5/31/08
to
Use the next code for Locate:

mydataset.Locate( 'Lastname', mystring, [] );
--
With best regards, Mike Shkolnik
Scalabium Software
http://www.scalabium.com
mshk...@scalabium.com

"Frank Burleigh" <burl...@indiana.edu> wrote in message
news:4840...@newsgroups.borland.com...

0 new messages