Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Loading LargeInt from c++ builder 6 |
Sat, May 30 2015 9:00 PM | Permanent Link |
Shedden | Hi,
It should be easy, like using cling wrap, but I'm challenged. I can create a table with a LargeInt key, but can't find a way to populate it. Here is one of several attempts: void caPat::setLargeInteger(AnsiString fld, __int64 val) { AnsiString t,c; Variant v; try { v=val; pTable1->FieldValues[fld]=v; } catch(EConvertError &e) { t="Patnum: "+IntToStr(val)+" Field: "+fld; c=IntToStr(val)+" is not an integer"; MessageBox(NULL,c.c_str(),t.c_str(),MB_OK+MB_ICONSTOP); } } If I inspect the variant, v, it's loaded. If I inspect the field it isn't. I get no compile or runtime errors, but the LargeInt field will be null. I've also tried pTable1->FieldByName(fld) and pTable1->FieldValues[fld].VInt64=val; pTable1 is a TDBISAM Table. All the other fields are loaded properly using statements like: pTable1->FieldValues[fld] = -1; pTable1->FieldValues[fld] = "help"; I never needed the variant and it didn't seem to work anyway. Thanks in advance for any help. I'm no longer sure what to try and the Internet has been heavily queried for an example. If it's a bug, I hope there is a work around using the table object, I've overflowed by primary key field. Best Regards, Jim Shedden I keep seeing the AsLargeInt, but only associated with parameters. |
Mon, Jun 1 2015 2:30 PM | Permanent Link |
Shedden | In C++ builder, this works where val is __int64:
((TLargeintField*)pTable1->FieldByName(fld))->AsLargeInt=val; |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |