Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 11 total |
Invalid Variant Type on Win 2000 and Int64 fields |
Wed, May 16 2007 7:00 AM | Permanent Link |
I just fell over an issue with DBISAM on Windows 2000 that may be useful
to others to know about. My code has the following line: if UpdateTable.Locate('msID;msXID;msState', VarArrayOf([n64ID, szXID, etsActive]), []) then On XP, this works fine. Run on Win2000 it fails with 'Invalid variant type'. After setting up the remote debugger, I've now pinned this down to the fact that I have Int64 fields, and Windows 2000 doesn't support these as variants. I think it is happening when DBISAM is returning the field set, not in the call. There is a comment in line 329 of the Delphi 2007 Variants.pas that explains this, and you can set the global variable OleVariantInt64AsDouble to true to overcome this. I've not tried this as yet. I figure that this may explain some unexplained errors, and it took me a few hours to pin down (mostly getting the remote debugger to work!). /Matthew Jones/ | |
Wed, May 16 2007 7:35 AM | Permanent Link |
> OleVariantInt64AsDouble
Hmm, I just turned this on, but it still has the exception. This is going to be a long one I can tell. /Matthew Jones/ | |
Wed, May 16 2007 8:41 AM | Permanent Link |
Okay, it seems that VarArrayOf is happy to take the Int64 value as-is,
with no conversion. DBISAM then gets a copy of the array, and that is passed to Windows for copying. Windows 2000 then barfs on the Int64 type. /Matthew Jones/ | |
Wed, May 16 2007 9:21 AM | Permanent Link |
Okay, I tried using the VarUtils code instead of the Windows versions, and
it doesn't support anything beyond varLongWord which oddly enough is varInt64. That's no help then. At this point, I have to ask if anyone knows about compatibility of DBISAM v4 Int64 fields and Windows 2000. It looks to me like it becomes quite hard to use them reliably. I may have to specify that XP is the only supported OS. For now, I'm stuck. /Matthew Jones/ | |
Thu, May 17 2007 1:32 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< At this point, I have to ask if anyone knows about compatibility of DBISAM v4 Int64 fields and Windows 2000. It looks to me like it becomes quite hard to use them reliably. I may have to specify that XP is the only supported OS. >> As far as I know, they should work fine with Windows 2000. However, I did find this: http://qc.borland.com/wc/qcmain.aspx?d=8858 It may be that the Variants unit is using the OLEVariant type at some point for the array elements and, therefore, the issue. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, May 18 2007 4:57 AM | Permanent Link |
I too found that page, and it is what made me give up. I'm surprised to be
the first to find this for DBISAM, but it may be worth noting for ElevateDB. It is a VCL limitation, but it is worth knowing about for In64 field use. /Matthew Jones/ | |
Fri, May 18 2007 3:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< I too found that page, and it is what made me give up. I'm surprised to be the first to find this for DBISAM, but it may be worth noting for ElevateDB. It is a VCL limitation, but it is worth knowing about for In64 field use. >> I'll have to do some more testing to find out exactly what the problem is before I document it. -- Tim Young Elevate Software www.elevatesoft.com |
Sat, May 19 2007 11:43 AM | Permanent Link |
It isn't hard to check - the failure comes quite soon. I just put in a
breakpoint and then stepped into it. I'm sure you don't need the other fields - locating on a single Int64 value, but making the VarArray, is all you need. And Windows 2000 of course! /Matthew Jones/ | |
Tue, May 22 2007 8:17 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< It isn't hard to check - the failure comes quite soon. I just put in a breakpoint and then stepped into it. I'm sure you don't need the other fields - locating on a single Int64 value, but making the VarArray, is all you need. And Windows 2000 of course! >> Yeah, that's the tough part. I've got Windows 2000, but I need to find a machine to install it on. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, May 23 2007 5:43 AM | Permanent Link |
See the VMWare thread on your discussion newsgroup. 8-)
I'd offer my VM, except that all the code is on my main PC and I was remote debugging. /Matthew Jones/ |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, June 12, 2024 at 01:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |