F
Fuweng
Unregistered / Unconfirmed
GUEST, unregistred user!
在C++Builder中Variant型数组怎么定义并赋值?
如下面这段程序为什么有错? (查询离线包中的letters表)
TLocateOptions SearchOptions;
Variant MyArray[2];
MyArray[0] = "yysun";
MyArray[1] = Variant(StrToDateTime(String("1998-8-28 11:43:16")));
bool SearchResult;
SearchResult = Table1->Locate("UserFrom;DateTime",MyArray,SearchOptions);
if(SearchResult)
Caption = "OK";
else
Caption = "NO";
出错信息是"Variant is not a array"
如下面这段程序为什么有错? (查询离线包中的letters表)
TLocateOptions SearchOptions;
Variant MyArray[2];
MyArray[0] = "yysun";
MyArray[1] = Variant(StrToDateTime(String("1998-8-28 11:43:16")));
bool SearchResult;
SearchResult = Table1->Locate("UserFrom;DateTime",MyArray,SearchOptions);
if(SearchResult)
Caption = "OK";
else
Caption = "NO";
出错信息是"Variant is not a array"