TMSLoader.Load "Invalid variant operation" in Delphi 5

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
skirsche
Posts: 8
Joined: Fri 03 Apr 2009 06:59

TMSLoader.Load "Invalid variant operation" in Delphi 5

Post by skirsche » Wed 16 Nov 2011 09:32

Using TMSLoader with a table containing a char column leads to an EVariantError with the message 'Invalid variant operation'. This happens in TMSLoader.Load. The method assigned to OnPutData is never called.

The problem appears to be limited to Delphi 5, everything works fine in Delphi 7.

I tried the following versions:
4.80.0.60 (13-Aug-2010) - does not have the problem
5.00.0.1 (13-Sep-2010) - has the problem
6.0.2 (13-Oct-2011) - has the problem

You can reproduce it with the example code from this post:
http://www.devart.com/forums/viewtopic.php?t=18831

But change the last column from integer to char:

Code: Select all

CREATE DATABASE TestDB 
GO 

USE TestDB 
GO 

CREATE TABLE Temp_Table 
( 
   a INTEGER IDENTITY NOT NULL, 
   b INTEGER NOT NULL, 
   c CHAR(50) 
) 

AndreyZ

Post by AndreyZ » Wed 16 Nov 2011 11:27

Hello,

Thank you for the information. We have reproduced this problem and fixed. This fix will be included in the next SDAC build.

Post Reply