Error inserting float values into real fields
Posted: Mon 10 Sep 2012 22:56
I ran into a very similar error about a year ago (refer to this thread http://forums.devart.com/viewtopic.php?f=6&t=21172), but an updated version of SDAC fixed that particular issue.
Recently, however, I downloaded the latest SDAC version, and it seems once again floating values cause problems in parameterized insert SQL statements. The following code now causes an error, even though it previously worked:
The exact error exception is as follows:
• Windows 7 (64-bit)
• RAD Studio 2010
• MS SQL Server Compact 3.5
• MS SQL Server Express 2008 R2
• SDAC 6.2.8
Recently, however, I downloaded the latest SDAC version, and it seems once again floating values cause problems in parameterized insert SQL statements. The following code now causes an error, even though it previously worked:
Code: Select all
Command->SQL->Text = "INSERT [TableName] ( [ValueReal] ) VALUES ( :ValueReal )";
Command->Params->Items[0]->Value = 3.14f;
Command->Execute();My development environment consists of:Invalid internal field type $21 (33)
(D:\Projects\Delphi\Dac\SqlServer\Source\OLEDBAccess.pas, line 1710)
• Windows 7 (64-bit)
• RAD Studio 2010
• MS SQL Server Compact 3.5
• MS SQL Server Express 2008 R2
• SDAC 6.2.8